Data Structures used in TCP/IP API - @CHIP-RTOS V1.04
IPC@Chip Documentation Index
Data Structures
Here are the BSD structures and own datatypes used by the TCP/IP API
.
All constants and data structures are defined in the header file tcpipapi.h
Notes:
- Byte alignment is required
within all data structures used within the API.
- The phrase "network byte order" means big endian (like Motorola machines, unlike Intel).
Content
:
PPP_Option
typedef struct tag_ppp_option
{
int protocolLevel;
int remoteLocalFlag;
int optionName;
const char *optionValuePtr;
int optionLength;
} PPP_Option;
Constants at tcpipapi.h
#define PPP_LCP_PROTOCOL 0x21c0
#define PPP_IPCP_PROTOCOL 0x2180
#define PPP_OPTION_WANT 0
#define PPP_OPTION_ALLOW 1
#define PPP_LCP_ACCM 2
#define PPP_LCP_PROTO_COMP 7
#define PPP_LCP_ADDRCTRL_COMP 8
#define PPP_IPCP_COMP_PROTOCOL 2
#define PPP_IPCP_DNS_PRI 29
#define PPP_IPCP_DNS_SEC 31Comments
- The type of data found at the location referenced by the optionValue
member varies
depending on the particular PPP option that is being dealt with.
When manipulating socket options, the protocol_level
at which the option resides and the
name of the option (optionName
member) must be specified.
The size of the buffer required pointed to by the optionValue
member depends on the option. These sizes (in Bytes)
are stated at the description list below. The parameters optionValue
and optionLength
are used to
access option values.
The struct member remoteLocalFlag
could have two possible values: PPP_OPTION_WANT
or PPP_OPTION_WANT
.
If remoteLocalFlag
has value PPP_OPTION_WANT
the IPC@Chip sends a PPP configuration
request to the connected peer, which contains the specified option.
If remoteLocalFlag
has value PPP_OPTION_ALLOW
the IPC@Chip accepts an incominc PPP configuration
request from the connected peer, which contains the specified option.
The following list shows the three different protocol levels and their valid PPP options,
including a short description and the length of the option value. Protocol level and optionName
constants referred to here are defined in tcpipapi.h
- protocol_level=PPP_LCP_PROTOCOL
(Lcp level options)
- optionName=PPP_LCP_ADDRCONTROL_COMP
: Size: 8 bit, sizeof(char) - Activate/Deactivate Address control
compression, default 0
- optionName=PPP_LCP_PROTO_COMP
: Size: 8 bit, sizeof(char) - Value 1: Protocol field compression, default 0: No compression
- optionName=PPP_LCP_ACCM
: Size: 32 bit, sizeof(long) - Set Async control character map, each bit position of the unsigned long value represents the
corressponding character, which should be escaped or not, during PPP session
- protocol_level=PPP_IPCP_PROTOCOL
(IpCp level options)
- optionName=PPP_IPCP_COMP_PROTOCOL
: Size: 16 bit, sizeof(int) - Value 1: VJ TCP/IP header compression, default 0: No compression
- optionName=PPP_IPCP_DNS_PRI
: Size: 32 bit, sizeof(long) - Specifies the IP addresses of the primary DNS server we will allow the
remote to use or the primary DNS server we want to us. If this option is called with the value 0 and remotelocalflag==PPP_OPTION_WANT,
we allow the connected peer to tell his his primary DNS server IP.
- optionName=PPP_IPCP_DNS_SEC
: Size: 32 bit, sizeof(long) - Specifies the IP addresses of the secondary DNS server we will allow the
remote to use or the secondary DNS server we want to us. If this option is called with the value 0 and remotelocalflag==PPP_OPTION_WANT,
we allow the connected peer to tell his his primary DNS server IP.
Related Topics
-
- API function PPPCLIENT_SET_OPTIONS - Set PPP client options
-
- API function PPPSERVER_SET_OPTIONS - Set PPP client options
-
- API function PPPCLIENT_GET_DNSIP - Get DNS IP
Developer Notes If the option PPP_IPCP_PROTOCOL (VJ TCP/IP header compression) is set, it could be possible that the FTP server of
the IPC@Chip is not usable via the PPP interface.
Top of list Index page
GetSocketOption
typedef struct tag_getsockopt
{
int protocol_level; // protocol level, ip level, tcp level or socket level
int optionName; // option's name
char *optionValue; // pointer to the option value buffer (type varies)
int *optionLength; // length of option value buffer
}GetSocketOption;
Constants at tcpipapi.h:
#define IP_PROTOIP_LEVEL 0
#define IP_PROTOTCP_LEVEL 6
#define SOCKET_LEVEL 0x7fff
#define IPO_TTL 0x0001
#define IPO_TOS 0x0002
#define TCP_NODELAY 0x0001
#define TCP_NOPUSH 0x0004
#define TCP_SLOW_START 0x0200
#define TCP_KEEPALIVE 0x4001
#define TCP_DELAY_ACK 0x4002
#define TCP_KEEPALIVE_INTV 0x4004
#define TCP_KEEPALIVE_CNT 0x4005
#define TCP_FINWT2TIME 0x4006
#define TCP_2MSLTIME 0x4007
#define TCP_MAXRT 0x0010
#define TCP_MAXREXMIT 0x4003
#define SO_REUSEADDR 0x0004
#define SO_KEEPALIVE 0x0008
#define SO_SNDBUF 0x1001
#define SO_RCVBUF 0x1002Comments
- The type of data found at the location referenced by the optionValue
member varies
depending on the particular socket option that is being dealt with.
When manipulating socket options, the protocol_level
at which the option resides and the
name of the option (optionName
member) must be specified. The size of the buffer (in Bytes) required
pointed to by the optionValue
member depends on the option. These sizes are stated in the
list below. The parameters optionValue
and optionLength
are used to
access option values.
The following list shows the three different protocol levels and their valid socket options,
including a short description and the length of the option value. Protocol level and optionName
constants referred to here are defined in tcpipapi.h
- protocol_level=IP_PROTOIP_LEVEL
(IP level options)
- optionName=IPO_TOS
: Size: 8 bit, sizeof (char) - Set IP type of service, default 0
- optionName=IPO_TTL
: Size: 8 bit, sizeof (char) - Set IP time-to-live hops, default 64
- protocol_level=IP_PROTOTCP_LEVEL
(TCP level options)
- optionName=TCP_NODELAY
: Size: 16 bit , sizeof (int) - 1:Disable nagle algorithm, default is 0: nagle algorithm is enabled
- optionName=TCP_NOPUSH
: Size: 16 bit , sizeof (int) -1: Force TCP to delay sending any TCP data until
a full sized segment is buffered in the TCP buffers, useful, if continuous large amount of data is sent like FTP, default is 0
- optionName=TCP_SLOW_START
: Size: 16 bit, sizeof (int) -1: Enable the TCP slow start algorithm(default), 0:disable
- optionName=TCP_KEEPALIVE
: Size: 16 bit, sizeof (int) - Set idle time seconds before sending keep alive probes, default 7200 seconds, min. 10 seconds, max. 32768 seconds
Notes:
The socket level option SO_KEEPALIVE
(see below) must be enabled, default 7200 seconds.
The minimum value was changed in @CHIP-RTOS 070 to 10 seconds (was 7200 seconds in @CHIP-RTOS 069).
- optionName=TCP_DELAY_ACK
: Size: 16 bit - Set the TCP delay ACK time in milliseconds, default:200 milliseconds, min. 0 ms, max. 65535 ms
- optionName=TCP_FINWT2TIME
: Size: 16 bit - Set the max. amount of time TCP will wait for the remote side to close, default 600 seconds, min 0 seconds, max 32768 seconds
- optionName=TCP_2MSLTIME
: Size: 16 bit - Set the max. amount of time TCP will wait in the TIME WAIT state, once it has initiated a close,default 2 seconds, min 0 seconds, 32768 seconds
- optionName=TCP_MAXRT
: Size: 16 bit - Set the TCP/IP Timeout in seconds, default 75 seconds, min. 1 seconds, max. 32768 seconds, -1 will wait forever
- optionName=TCP_MAXREXMIT
: Size: 16 bit - Set the maximum number of TCP/IP Send retries,,default 12, min. 0, max. 32768
- optionName=TCP_KEEPALIVE_INTV
: Size: 16 bit - Set keep alive interval probes,
default 75 seconds, min. 1 seconds, max. 600 seconds
Note:
This value can not be changed after a connection is established. Also the socket may not be in listen mode.
- optionName=TCP_KEEPALIVE_CNT
: Size: 16 bit - Set maximum number of keep alive
probes before TCP gives up and closes the connection, default: 8, min. 0, max. 32768
- protocol_level=SOCKET_LEVEL
- optionName=SO_REUSEADDR
: Size: 16 bit - Enable/disable local address reuse,
coding: 1=enable, 0=disable default: enable
- optionName=SO_KEEPALIVE
: Size: 16 bit - Keep connections alive,
coding: 1=enable, 0=disable default: disable
- optionName=SO_SNDBUF
: Size: 32 bits - Socket send buffer size, default TCP 4096, UDP 2048 bytes.
(We recommend a maximum size of 8192 Bytes.)
- optionName=SO_RCVBUF
: Size: 32 bits - Socket input buffer size, default TCP 4096, UDP 2048 bytes.
(We recommend at maximum size of 8192 Bytes.)
Related Topics
-
- API function API_GETSOCKOPT - Get socket options
-
- SetSocketOption typedef
Top of list Index page
in_addr
struct in_addr
{
u_long s_addr; // 32 bit netid/hostid address in network byte order
}; Top of list Index page
Packet_Count
typedef struct tag_cnt_packet
{
unsigned int * cnt_all_packets; // count all incoming Ethernet packets
unsigned int * cnt_ip_packets; // count incoming IP packets
unsigned int * cnt_arp_packets; // count incoming ARP packets
unsigned int * cnt_tcp_packets; // count incoming TCP packets
unsigned int * cnt_udp_packets; // count incoming UDP packets
unsigned int * cnt_icmp_packets; // count incoming ICMP packets
unsigned int * cnt_all_sended_packets; // count all sent Ethernet packets
unsigned int * cnt_ip_sended_packets; // count all sent IP packets
unsigned int * cnt_arp_sended_packets; // count all sent ARP packets
unsigned int * cnt_tcp_sended_packets; // count all sent TCP packets
unsigned int * cnt_udp_sended_packets; // count all sent UDP packets
unsigned int * cnt_icmp_sended_packets; // count all sent ICMP packets
unsigned int * cnt_ip_chksum_errs; // count all checksum errors on incoming IP packets
unsigned int * cnt_udp_chksum_errs; // count all checksum errors on incoming UDP packets
unsigned int * cnt_tcp_chksum_errs; // count all checksum errors on incoming TCP packets
unsigned int * cnt_eth_errs; // count all errors on incoming Ethernet packets
} Packet_Count;Comments
- Note: The counters count_all_packets
and count_all_sended_packets
count only
Ethernet packets.
Other counters also count the packets from and to other devices e.g. local loopback packets
and PPP packets.
Related Topics
-
- API function TCPIP_STATISTICS - Open PPP client session.
Top of list Index page
Ping
typedef struct tag_ping_command
{
int sd; // socket descriptor, set by PING_OPEN
// User must set following four values prior to PING_OPEN API call
char * remoteHostNamePtr; // Remote IP
int pingInterval; // seconds
int pingDataLength; // maximum 1024 bytes
unsigned long count; // number of pings to send
unsigned char pingstate; // pin socket state, 1: open 0: closed
//statistics, filled by ping command
unsigned long transmitted; // sent ping requests
unsigned long received; // received replies
unsigned int lastsenderr; // last send error
unsigned int lastrcverr; // last receive error
unsigned long maxRtt; // Maximum round trip time, rounded off to 100 ms step, in milliseconds
unsigned long minRtt; // Minimum round trip time in milliseconds, (100 ms steps)
unsigned long lastRtt; // round trip time (100 ms steps) of the last ping request/reply
} Ping;Comments
- Caller to PING_OPEN API must initialize structure members:
remoteHostNamePtr
... who to "ping"
pingInterval
... block repetition rate
pingDataLength
... size of ping data blocks
dummy
... simply zero this value
The remainder of the data structure is managed within the API functions.
Related Topics
-
- API function PING_OPEN - Start ICMP echo requests
Top of list Index page
PPPClient_Init
typedef struct tag_ppp_client
{
int port; // serial port (0:EXT 1:COM)
int auth; // 0: no authentication
// 1:PAP Client must send username and password for PAP authentication to the peer
// 2:CHAP Client must send username and password for CHAP authentication to the peer
// 3:PAP Client expects PAP username and password from the peer
// 4:CHAP Client expects CHAP username and password from the peer
int modem; // modem usage (0:nullmodem 1:modem)
int flow; // serial flow control (0: none, 1:XON/XOFF, 2:RTS/CTS)
long baud; // Serial port BAUD rate
unsigned long idletimeout; // closing PPP after idle time seconds (0: no closing after idle time)
char username[50]; // Used if .auth != 0
char password[50]; // Used if .auth != 0
void * dptr; // dummy ptr
char PPPClieipAddrStr[16]; //If IP is set to "0.0.0.0" client expect IP form the peer, IP is filled in after sucessful connection
//If IP is set to a string != "0.0.0.0" client wants to use this IP during the ppp session
char PPPClieRemipAddrStr[16]; //If RemoteIP is set to "0.0.0.0" client allow the peer to use its own IP during the PPP session,
the RemoteIP is filled in after sucessful connection
//If RemoteIP is set to a string != "0.0.0.0" client wants to configure the remote peer with this IP
char PPPClienetMaskStr[16]; // subnet mask
char PPPClieipGatewayStr[16]; // gateway
PPPDial pppdial[PPP_MAX_DIAL]; // modem/dial entries
PPP_ModemHangup modem_hangup; // modem hang-up commands
int break_modem; // Flag for breaking SC12 - modem
// control communication (dialing, waiting for connect)
// Setting break_modem to 1, breaks current modem control communication
// between SC12 and the modem at a PPP client open or close call,
// The PPP client reads this flag and breaks the dialing, if flag is set.
// This flag could be set from another task. It will not break an established
// PPP link! Don't forget to clear this flag to zero after breaking.
} PPPClient_Init;Comments
- The PPPClient_Init
structure is used to open a PPP client session.
The flow control mode XON/XOFF is not tested. It is not advisable to use it.
Since @CHIP-RTOS 1.02B XON/XOFF mode is also available if the DMA
mode for the selected serial port is enabled but because of the internal functionality of DMA it is not
possible to detect an XON or XOFF of the peer immediateley. It is possible that
an overrun situation at the connected peer (e.g. GSM modem) could occur. We enable this mode now because GSM modems (any??)
supports only XON/XOFF flow ctrl.
The PPPClient_Init
structure contains an array of the PPPdial
structures
used for initializing and dialing a modem.
These modem commands will be executed at the start of establishing a connection to a PPP server.
The PPPClient_Init
structure also contains a PPP_ModemHangup
structures
for closing the modem connection
For how to initialize and use these structures see the PPPCLIE.C example.
Related Topics
-
- API function PPPCLIENT_OPEN - Open PPP client session.
-
- PPPdial dial-up command data
Top of list Index page
PPPDial
typedef struct tag_pppdial_init
{
char * modemcmd; // modem command string
char * modemans; // modem answer string
int timeout; // seconds, 0 = no time out
int retries; // Maximum number of dial attempts.
char expect_send; // = 0: PPP client sends modem AT command
// and expects modem answer (e.g. OK).
// = 1: PPP client expects modem answer
// (e.g. CONNECT) and sends modem command.
} PPPDial;Comments
- The PPPDial
structure is used during PPP client dial-up.
Related Topics
-
- API function PPPCLIENT_OPEN - Open PPP client session
-
- PPPClient_Init PPP client open data structure
Top of list Index page
PPP_ModemHangup
typedef struct tag_pppclie_hangup
{
char *modemcmdmode; // string for switching modem into command mode e.g. +++
int delay; // delay time after switching in seconds
PPPDial pppdial[PPP_MAX_DIAL]; // modem commands and answer for hang-up procedure
}PPP_ModemHangup;Comments
- The PPP_ModemHangup
structure is used when closing a PPP modem connection.
Related Topics
-
- API function PPPCLIENT_OPEN - Open PPP client session
-
- PPPClient_Init PPP client open data structure
Top of list Index page
PPP_IPCfg_Data
typedef struct tag_pppipcfg_data
{
char IP[16]; // PPP server IP
char RemIP[16]; // Remote IP (given to the client, if connected)
char Netmask[16]; // Subnet mask
char Gateway[16]; // Gateway
unsigned int comport; // COM port: EXT=0, COM=1
unsigned int papauth; // 0: no authentication 1:PAP 2:CHAP
unsigned int modem; // Analog Modem=1, Null Modem cable=0
unsigned int flow; // Flow control
long baud; // BAUD rate
} PPP_IPCfg_Data;Comments
- The PPP_IPCfg_Data
structure is used to read out the configuration of the PPP server.
Related Topics
-
- API function PPPSERVER_GET_CFG - Get PPP server configuration
Top of list Index page
recv_params
struct recv_params
{
char *bufferPtr; // Store incoming data here
int bufferLength; // Maximum bytes to store
int flags; // Blocking, timeout or no wait
struct sockaddr *fromPtr; // only needed for UDP
int *fromlengthPtr; // only needed for UDP
unsigned long timeout; // timeout milliseconds
};Comments
- The sockaddr
structure
referenced by the fromPtr
member
is cast to a sockaddr_in
structure
prior to usage.
The integer referenced by the fromlengthPtr
pointer should be
set to sizeof(struct sockaddr_in).
Flags:
MSG_BLOCKING: Sleeping until data comes in
MSG_TIMEOUT : The caller wakes up from recv after timeout or if data comes in, struct member timeout must be filled
MSG_DONTWAIT: Return immediately, if nothing received
Top of list Index page
Route_Entry
typedef struct tag_route_entry{
unsigned long destIPAddress; // The IP address to add the route for
unsigned long destNetmask; // The netmask for the route
unsigned long gateway; // IP address of the gateway of the route
int hops; // Number or routers between this host and route
} Route_Entry;Comments
Top of list Index page
SetSocketOption
typedef struct tag_setsockopt
{
int protocol_level; // protocol level, ip level,tcp level or socket level
int optionName; // option's name
const char *optionValue; // pointer to the option value (type varies)
int optionLength; // length of option value data
}SetSocketOption;
// Example usage of API_SETSOCKOPT and SetSocketOption type to set
// IP Time-to-Live to 69 seconds:
union REGS inregs, outregs;
struct SREGS segregs;
unsigned char time_to_live = 69;
int socketdescriptor;
SetSocketOption sockopt = {IP_PROTOIP_LEVEL, // .protocol_level
IPO_TTL, // .optionName
(const char*)&time_to_live, // .optionValue
sizeof(unsigned char)}; // .optionLength
inregs.h.ah = API_SETSOCKOPT;
inregs.x.bx = socketdescriptor;
segregs.h.es = FP_SEG(&sockopt); // Fill in ES:DI with a pointer to sockopt
inregs.x.di = FP_OFF(&sockopt);
int86x(TCPIPVECT, &inregs, &outregs, &segregs); // Call API interrupt 0xAC function API_SETSOCKOPTComments
- The type of data found at the location referenced by the optionValue
member varies
depending on the particular socket option that is being dealt with.
Related Topics
-
- For list of options and sizes see GetSocketOption
-
- API function API_SETSOCKOPT - Set socket options
Top of list Index page
PasCallBack
typedef struct tag_PasCallBack
{
int sd; // socket descriptor
int event; // occured event
}PasCallBack;Comments
- The Pointer to this struct will be committed to a Pascal callback function in the
registers ES:DI. You can read out the information about the socket and the event
which has invoked the callback function.
Related Topics
-
- To register a pascal callback function see API_REGISTER_CALLBACK_PASCAL
Top of list Index page
send_params
struct send_params
{
char *bufferPtr; // Pointer to send data
int bufferLength; // Number of bytes to send
int flags; // Blocking or no wait
struct sockaddr *toPtr; // only needed for UDP
int *tolengthPtr; // only needed for UDP
};Comments
- The sockaddr
structure
referenced by the toPtr
member
is cast to a sockaddr_in
structure
prior to usage.
The integer referenced by the tolengthPtr
pointer should be
set to sizeof(struct sockaddr_in).
Flags:
MSG_BLOCKING: Sleeping until data is placed at the socket transmit queue
MSG_DONTWAIT: Return immediately
Top of list Index page
sockaddr
struct sockaddr
{
u_char sa_len; // Total Length
u_char sa_family; // Address Family AF_xxx
char sa_data[14]; // up to 14 bytes of protocol specific address
};Comments
- This generic "one size fits all" BSD structure is treated as a
sockaddr_in
structure
within the TCP/IP API
functions.
Top of list Index page
sockaddr_in
struct sockaddr_in
{
short sin_family; // AF_INET
u_short sin_port; // 16bit Port Number in network byte order
struct in_addr sin_addr; // 32bit netid/hostid in network byte order
char sin_zero[8]; // unused
};Comments
- The sin_family
member should be set to AF_INET
(=2).
The sin_addr
member's in_addr
structure
is simply a long IP address in big endian byte order.
Top of list Index page
tagIfMib
typedef struct tagIfMib //interface, only ethernet is supported
{
long ifIndex; // index of this interface 1 for ethernet, currently only ethernet
char ifDescr[32]; // description of interface
long ifType; // network device type
long ifMtu; // maximum transfer unit
unsigned long ifSpeed; // bandwidth in bits/sec
unsigned char ifPhysAddress[11]; // interface's address
unsigned char PhysAddrLen; // length of physAddr: 6
long ifAdminStatus; // desired state of interface, not supported
long ifOperStatus; // current operational status, not supported
//counters
unsigned long devLastChange; // value of sysUpTime when current state entered
unsigned long devInOctets; // number of octets received on interface
unsigned long devInUcastPkts; // number of unicast packets delivered
unsigned long devInMulticastPkts; // number of multicast packets delivered, not supported
unsigned long devInBroadcastPkts; //broadcasts delivered
unsigned long devInDiscards; // number of broadcasts
unsigned long devInErrors; // number of packets containing errors
unsigned long devInUnknownProtos; // number of packets with unknown protocol
unsigned long devOutOctets; // number of octets transmitted
unsigned long devOutUcastPkts; // number of unicast packets sent
unsigned long devOutMulticastPkts;// number of multicast packets sent
unsigned long devOutBroadcastPkts;//broadcasts sent
unsigned long devOutDiscards; // number of packets discarded with no error
unsigned long devOutErrors; // number of pkts discarded with an error
unsigned long devOutQLen; // number of packets in output queue
}IfMib;Comments
- Note: These structures are only available at @CHIP-RTOS versions, which contain the
SNMP option. A SNMP agent is not part of the @CHIP-RTOS. But if an user is able to implement
an agent based on the TCPIP API, he needs access to the internal TCPIP SNMP variables
The SNMP varialbes are not a part of our current official 6 @CHIP-RTOS versions. You must order direct a @CHIP-RTOS version, which includes
this feature.
Related Topics
-
- API function API_SNMP_GET - Get internal TCPIP SNMP variables
Top of list Index page
tagIpMib
typedef struct tagIpMib
{
long ipForwarding; // 1
long ipDefaultTTL; // default TTL for pkts originating here
unsigned long ipInReceives; // no. of IP packets received from interfaces
unsigned long ipInHdrErrors; // number of pkts discarded due to header errors
unsigned long ipInAddrErrors; // no. of pkts discarded due to bad address
unsigned long ipForwDatagrams; // number pf pkts forwarded through this entity
unsigned long ipInUnknownProtos; // no. of local-addressed pkts w/unknown proto
unsigned long ipInDiscards; // number of error-free packets discarded
unsigned long ipInDelivers; // number of datagrams delivered to upper level
unsigned long ipOutRequests; // number of IP datagrams originating locally
unsigned long ipOutDiscards; // number of error-free output IP pkts discarded
unsigned long ipOutNoRoutes; // number of IP pkts discarded due to no route
long ipReasmTimeout; // seconds fragment is held awaiting reassembly
unsigned long ipReasmReqds; // no. of fragments needing reassembly (here)
unsigned long ipReasmOKs; // number of fragments reassembled
unsigned long ipReasmFails; // number of failures in IP reassembly
unsigned long ipFragOKs; // number of datagrams fragmented here
unsigned long ipFragFails; // no. pkts unable to be fragmented here
unsigned long ipFragCreates; // number of IP fragments created here
unsigned long ipRoutingDiscards;
} IpMib;Comments
- Note: These structures are only available at @CHIP-RTOS versions, which contain the
SNMP option. A SNMP agent is not part of the @CHIP-RTOS. But if an user is able to implement
an agent based on the TCPIP API, he needs access to these internal TCPIP variables
Related Topics
-
- API function API_SNMP_GET - Get internal TCPIP SNMP variables
Top of list Index page
tagIcmpMib
typedef struct tagIcmpMib
{
unsigned long icmpInMsgs; // Total of ICMP msgs received
unsigned long icmpInErrors; // Total of ICMP msgs received with errors
unsigned long icmpInDestUnreachs;
unsigned long icmpInTimeExcds;
unsigned long icmpInParmProbs;
unsigned long icmpInSrcQuenchs;
unsigned long icmpInRedirects;
unsigned long icmpInEchos;
unsigned long icmpInEchoReps;
unsigned long icmpInTimestamps;
unsigned long icmpInTimestampReps;
unsigned long icmpInAddrMasks;
unsigned long icmpInAddrMaskReps;
unsigned long icmpOutMsgs;
unsigned long icmpOutErrors;
unsigned long icmpOutDestUnreachs;
unsigned long icmpOutTimeExcds;
unsigned long icmpOutParmProbs;
unsigned long icmpOutSrcQuenchs;
unsigned long icmpOutRedirects;
unsigned long icmpOutEchos;
unsigned long icmpOutEchoReps;
unsigned long icmpOutTimestamps;
unsigned long icmpOutTimestampReps;
unsigned long icmpOutAddrMasks;
unsigned long icmpOutAddrMaskReps;
} IcmpMib;Comments
- Note: These structures are only available at @CHIP-RTOS versions, which contain the
SNMP option. A SNMP agent is not part of the @CHIP-RTOS. But if an user is able to implement
an agent based on the TCPIP API, he needs access to these internal TCPIP variables
Related Topics
-
- API function API_SNMP_GET - Get internal TCPIP SNMP variables
Top of list Index page
tagTcpMib
typedef struct tagTcpMib
{
long tcpRtoAlgorithm; // retransmission timeout algorithm
long tcpRtoMin; // minimum retransmission timeout (mS)
long tcpRtoMax; // maximum retransmission timeout (mS)
long tcpMaxConn; // maximum tcp connections possible
unsigned long tcpActiveOpens; // number of SYN-SENT -> CLOSED transitions
unsigned long tcpPassiveOpens; // number of SYN-RCVD -> LISTEN transitions
unsigned long tcpAttemptFails; //(SYN-SENT,SYN-RCVD)->CLOSED or SYN-RCVD->LISTEN
unsigned long tcpEstabResets; // (ESTABLISHED,CLOSE-WAIT) -> CLOSED
unsigned long tcpCurrEstab; // number in ESTABLISHED or CLOSE-WAIT state
unsigned long tcpInSegs; // number of segments received
unsigned long tcpOutSegs; // number of segments sent
unsigned long tcpRetransSegs; // number of retransmitted segments
unsigned long tcpInErrs; // number of received errors
unsigned long tcpOutRsts; // number of transmitted resets
} TcpMib; Top of list Index page
tagUdpMib
typedef struct tagUdpMib
{
unsigned long udpInDatagrams; // UDP datagrams delivered to users
unsigned long udpNoPorts; // UDP datagrams to port with no listener
unsigned long udpInErrors; // UDP datagrams unable to be delivered
unsigned long udpOutDatagrams;// UDP datagrams sent from this entity
}UdpMib;Comments
- Note: These structures are only available at @CHIP-RTOS versions, which contain the
SNMP option. A SNMP agent is not part of the @CHIP-RTOS. But if an user is able to implement
an agent based on the TCPIP API, he needs access to the internal TCPIP SNMP variables
Related Topics
-
- API function API_SNMP_GET - Get internal TCPIP SNMP variables
Top of list Index page
tag_atEntry
typedef struct tag_atEntry {
long IfIndex; // interface on which this entry maps
unsigned char PhysAddress[11]; // physical address of destination
unsigned char PhysAddressLen; // length of atPhysAddress
unsigned long NetAddress; // IP address of physical address
}atEntry;Comments
- Note: These structures are only available at @CHIP-RTOS versions, which contain the
SNMP option. A SNMP agent is not part of the @CHIP-RTOS. But if an user is able to implement
an agent based on the TCPIP API, he needs access to the internal TCPIP SNMP variables
Related Topics
-
- API function API_SNMP_GET - Get internal TCPIP SNMP variables
Top of list Index page
UserEthDhcp_Entry
typedef struct tag_UserDhcpEthEntry
{
unsigned long BootSIpAddress; //BOOT Server (TFTP server), not supported
unsigned long Dns1ServerIpAddress; // Domain name server
unsigned long Dns2ServerIpAddress; // Second domain name server
unsigned long Yiaddr; // Our (leased) IP address
unsigned long NetMask; // Our subnet mask
unsigned long DefRouter; // Default router
unsigned long DhcpServerId; // DHCP selected server IP address
unsigned long internal1; // Internal use only
unsigned long internal2; // Internal use only
unsigned long DhcpLeaseTime; // DHCP Address lease time in milliseconds
unsigned long internal3; // internal use only
unsigned long internal4; // internal use only
unsigned char DomainName[64]; // Domain name
unsigned char BootSname[64]; // TFTP server name, not used
unsigned char BootFileName[128]; // Boot file name (for TFTP download), not supported
unsigned short BootFileSize; // Boot file size in 512 Bytes blocks (for TFTP download)
unsigned short internal5; // internal use only
}UserEthDhcp_Entry;Comments
- Note: Members of this structure hold the dhcp configuration data, if the IPC@CHIP is configured
by a DHCP server. This is a read only information!
Related Topics
-
- API function DHCP_STAT - Get DHCP status of the Ethernet interface
Top of list Index page
End of document
|