28 #ifndef _SERIALBURNERDATA_H_ 29 #define _SERIALBURNERDATA_H_ 40 #include "nbfactory.h" 50 #define PROTOCOL_UDP_TO_SERIAL ( 1 ) 51 #define PROTOCOL_TCP_TO_SERIAL ( 2 ) 52 #define PROTOCOL_SSH ( 3 ) 55 #define SERIAL_MODE_RS232 ( 1 ) 56 #define SERIAL_MODE_DEBUG ( 2 ) 57 #define SERIAL_MODE_485H ( 3 ) 58 #define SERIAL_MODE_485F ( 4 ) 59 #define SERIAL_MODE_485H_ECHO ( 5 ) // Used by PK70 quad UART blade board - S/W configurable 60 #define SERIAL_MODE_485H_NOECHO ( 6 ) // Used by PK70 quad UART blade board - S/W configurable 63 #define SERIAL_FLOW_MODE_NONE ( 1 ) 64 #define SERIAL_FLOW_MODE_XON_OFF ( 2 ) 65 #define SERIAL_FLOW_MODE_RTS_CTS ( 3 ) 68 #define SERIAL_CONNECT_CONNECT_NEVER ( 1 ) 69 #define SERIAL_CONNECT_CONNECT_AT_POWERUP ( 2 ) 70 #define SERIAL_CONNECT_CONNECT_WHEN_DATARX ( 3 ) 72 #define SERIAL_CONNECT_CONNECT_WHEN_DSR ( 4 ) 73 #define SERIAL_CONNECT_CONNECT_WHEN_CD ( 5 ) 77 #define IP_ADDR_MODE_DHCP ( 1 ) 78 #define IP_ADDR_MODE_STATIC ( 2 ) 81 #define CONNECT_NAME_LENGTH ( 79 ) 82 #define CONNECT_MESSAGE_LENGTH ( 79 ) 83 #define CONNECT_LOSS_MESSAGE_LENGTH ( 79 ) 84 #define DEVICE_NAME_LENGTH ( 15 ) 85 #define NTP_NAME_LENGTH ( 35 ) 86 #define USERNAME_LENGTH ( 39 ) 87 #define PASSWORD_LENGTH ( 39 ) 90 #define MAX_UDP_RX_BUFFER ( 1500 ) 91 #define BUFFER_SIZE ( 20000 ) 94 #define SNMP_PRIO ( MAIN_PRIO - 2 ) 95 #define AT_COM_PRIO ( MAIN_PRIO - 3 ) 97 #ifdef NB_FACTORY_INCLUDE_SSH 100 #define SSH_USERNAME_LENGTH ( 39 ) 101 #define SSH_PASSWORD_LENGTH ( 39 ) 105 #ifdef NB_FACTORY_INCLUDE_SSL 116 #define SERIAL_BURNER_CERTIFICATE_SIZE_MAX ( ( 2 * 1024 ) - 1 ) 117 #define SERIAL_BURNER_CERTIFICATE_SIZE_MAX_PEM ( ( 3 * 1024 ) - 1 ) 121 #if defined(NB_FACTORY_INCLUDE_SSH) || defined(NB_FACTORY_INCLUDE_SSL) 124 #define SERIAL_BURNER_LIBRARY_DEFAULT ( (BYTE)0x00 ) 125 #define SERIAL_BURNER_DEFAULT ( (BYTE)0x01 ) 126 #define SERIAL_BURNER_USER_INSTALLED ( (BYTE)0x02 ) 137 #define SERIAL_BURNER_KEY_SIZE_MAX_PEM ( ( 4 * 1024 ) - 1 ) 146 #define SERIAL_BURNER_HTML_INPUT_NUMBER_SIZE ( 5 ) 149 #define SERIAL_BURNER_HTML_HEX_NUMBER_LENGTH ( 2 ) 153 #define SERIAL_BURNER_PORT_COLUMN_WIDTH_PERCENT \ 154 ( 60 / (NB_FACTORY_SERIAL_PORTS + NB_FACTORY_I2C_PORTS)) 156 #define SERIAL_BURNER_PORT_COLUMN_WIDTH_PERCENT \ 157 ( 60 / (NB_FACTORY_SERIAL_PORTS)) 162 #define SERIAL_BURNER_HTML_I2C_WIDTH ( 70 ) 165 #define SERIAL_BURNER_HTML_INPUT_SIZE ( 39 ) 168 #define SERIAL_BURNER_HTML_IP_STRING_SIZE ( 20 ) 171 #define SERIAL_BURNER_PASSWORD_STRING \ 172 "*******************" 179 #define boot_iprintf(...)\ 181 if ( gConfigRec.m_q_boot == 0 ) \ 183 iprintf( "%s : ", NV_Settings.DeviceName ); \ 184 iprintf( __VA_ARGS__ ); \ 194 #define debug_iprintf(...)\ 196 if ( bShowDebug == TRUE ) \ 198 iprintf( "%s : ", NV_Settings.DeviceName ); \ 199 iprintf( __VA_ARGS__ ); \ 215 char SysContact[ 256 ];
217 char SysLocation[ 256 ];
218 unsigned char ReadCommunity[ 40 ];
219 unsigned char WriteCommunity[ 40 ];
221 DWORD trap_enable_flags;
276 struct NV_OnePortSetting
279 DWORD InactivityTimeoutInSecs;
280 DWORD New_connection_timeout;
283 char ConnectName[2][ ( CONNECT_NAME_LENGTH + 1 ) ];
285 DWORD ConnectIdleTimeout;
286 DWORD Connection_retry_timeout;
287 DWORD keepAliveInterval;
290 DWORD CustomBaudRate;
296 char ConnectMessage[ ( CONNECT_MESSAGE_LENGTH + 1 ) ];
297 char ConnectLossMessage[ ( CONNECT_LOSS_MESSAGE_LENGTH + 1 ) ];
302 WORD UdpAccumulatedChars;
304 WORD TcpAccumulatedChars;
308 BOOL bTcpCustomFrame;
310 BOOL bUdpCheckFrameingChar;
311 BOOL bTcpCheckFramingChar;
312 BOOL bAlwaysStoreSerialChars;
314 BOOL bDTRReflectsConnection;
328 struct NV_OneI2CPortSetting
332 unsigned long FreqDivider;
333 unsigned long CustomBaudRate;
334 unsigned char SetMasterAddress;
335 unsigned char SaveMasterAddress;
338 unsigned short ListenPort;
339 unsigned long InactivityTimeoutInSecs;
340 unsigned long New_connection_timeout;
341 unsigned long ConnectIdleTimeout;
385 struct NV_SettingsStruct
391 char DeviceName[ ( DEVICE_NAME_LENGTH + 1 ) ];
392 char NetBIOSName[ ( NETBIOS_NAME_SIZE_IN_CHARS + 1 ) ];
393 char NTPName[ NTP_NAME_LENGTH+ 1 ];
397 NV_OnePortSetting ports[ NB_FACTORY_SERIAL_PORTS ];
400 char UserName[ ( USERNAME_LENGTH + 1 ) ];
401 char Password[ ( PASSWORD_LENGTH + 1 ) ];
405 char slaveI2CAddress[3];
408 NV_OneI2CPortSetting i2c_port;
411 #ifdef NB_FACTORY_INCLUDE_SSL 414 BYTE SslCertificateSource;
415 WORD SslCertificateLength;
420 #ifdef NB_FACTORY_INCLUDE_SSH 423 char SshUserName[ ( SSH_USERNAME_LENGTH + 1 ) ];
424 char SshPassword[ ( SSH_PASSWORD_LENGTH + 1 ) ];
427 BYTE SshKeyRsaSource;
428 WORD SshKeyRsaLength;
429 BYTE SshKeyDsaSource;
430 WORD SshKeyDsaLength;
434 BOOL bAllowAtToAccessAPassword;
435 BOOL bAllowAtToAccessSPassword;
441 DWORD STDEFFSVerifyKey;
444 BYTE Wifi_IP_Addr_mode;
459 extern volatile BOOL Settings_Changed;
462 extern NV_SettingsStruct NV_Settings;
465 extern NV_SettingsStruct gNV_SettingsChangeCopy;
468 extern volatile BOOL gChangedUserParameters;
471 extern ConfigRecord gConfigRecordChangeCopy;
474 extern volatile BOOL gChangedConfigurationRecord;
477 extern BOOL bShowDebug;
482 extern const char* IPModeList[];
483 extern const char* IPValueList[];
484 extern const char* IPOnClickList[];
485 extern const char* BaudList[];
486 extern const char* BitList[];
487 extern const char* ParityList[];
488 extern const char* StopList[];
489 extern const char* FlowModeList[];
490 extern const char* SerialModeListFull[];
491 extern const char* SerialModeListRS232[];
492 extern const char* SerialModeListRS485[];
493 extern const char* SerialModeListHybrid[];
494 extern const char* SerialModeListQuad485[];
495 extern const char* SerialModeListQuadMMS[];
496 extern const char* ConnectMode[];
497 extern const char* ProtocolList[];
498 extern BYTE SerialModeCapability[];
507 extern BOOL UserSaveData(
char* dataPtr,
int dataSize,
const char* fileName );
510 extern BOOL UserGetData(
char* dataPtr,
char* fileName,
int dataSize );
512 extern void RegisterPost(
void );
516 extern void SetAndSaveDefaults(
void );
519 extern char GetHexByte(
const char* cp );
Used to hold and manipulate IPv4 and IPv6 addresses in dual stack mode.
Definition: ipv6_addr.h:28
void CheckNVSettings()
Definition: webif.cpp:40