ADTF  3.18.3
sockettypes.h
Go to the documentation of this file.
1 
7 #ifndef _SOCKET_TYPES_HEADER_
8 #define _SOCKET_TYPES_HEADER_
9 
10 namespace A_UTILS_NS
11 {
12 #ifdef WIN32
13  typedef tHandle tSocketHandle;
14 #else
15  typedef int tSocketHandle;
17  #define INVALID_SOCKET -1
19  #define SD_BOTH 2
20 #endif
34 typedef struct iphdr
35 {
36  unsigned int h_len:4;
37  unsigned int version:4;
38  unsigned char tos;
39  unsigned short total_len;
40  unsigned short ident;
41  unsigned short frag_and_flags;
42  unsigned char ttl;
43  unsigned char proto;
44  unsigned short checksum;
45  unsigned int sourceIP;
46  unsigned int destIP;
47 
48 } tIPHeader;
49 
51 typedef struct _ihdr
52 {
59 } tICMPHeader;
60 
61 } // namespace A_UTILS_NS
62 
63 #endif // _SOCKET_TYPES_HEADER_
uint8_t tUInt8
type definition for unsigned integer values (8bit) (platform and compiler independent type).
uint16_t tUInt16
type definition for unsigned integer values (16bit) (platform and compiler independent type).
tVoid * tHandle
type definition for a handle value (platform and compiler dependent type).
uint32_t tUInt32
type definition for unsigned integer values (32bit) (platform and compiler independent type).
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
Definition: d_ptr.h:11
int tSocketHandle
work with platform undependend typedefinitions for socket handlers
Definition: sockettypes.h:15
ICMP header.
Definition: sockettypes.h:52
tUInt16 i_id
Definition: sockettypes.h:56
tUInt16 i_seq
Definition: sockettypes.h:57
tUInt16 i_cksum
Definition: sockettypes.h:55
tUInt8 i_type
Definition: sockettypes.h:53
tUInt8 i_code
type sub code
Definition: sockettypes.h:54
tUInt32 timestamp
This is not the std header, but we reserve space for time.
Definition: sockettypes.h:58
IP header.
Definition: sockettypes.h:35
unsigned int destIP
Definition: sockettypes.h:46
unsigned char ttl
Definition: sockettypes.h:42
unsigned short checksum
IP checksum.
Definition: sockettypes.h:44
unsigned int version
Version of IP.
Definition: sockettypes.h:37
unsigned char tos
Type of service.
Definition: sockettypes.h:38
unsigned short ident
unique identifier
Definition: sockettypes.h:40
unsigned short frag_and_flags
flags
Definition: sockettypes.h:41
unsigned short total_len
total length of the packet
Definition: sockettypes.h:39
unsigned char proto
protocol (TCP, UDP etc)
Definition: sockettypes.h:43
unsigned int sourceIP
Definition: sockettypes.h:45
unsigned int h_len
length of the header
Definition: sockettypes.h:36