INET Framework for OMNeT++/OMNEST
inet::serializer Namespace Reference

Classes

struct  abort_chunk
 
struct  add_ip_parameter
 
struct  add_streams_request_parameter
 
class  ARPSerializer
 Converts between ARPPacket and binary (network byte order) ARP header. More...
 
struct  asconf_ack_chunk
 
struct  asconf_chunk
 
struct  auth_chunk
 
class  Buffer
 Buffer for serializer/deserializer. More...
 
class  ByteArraySerializer
 
struct  chunk
 
struct  common_header
 
class  Context
 class for data transfer from any serializers to subserializers e.g. More...
 
struct  cookie_ack_chunk
 
struct  cookie_echo_chunk
 
struct  cookie_parameter
 
struct  data_chunk
 
struct  data_vector
 
class  DefaultSerializer
 
struct  error_cause
 
struct  error_cause_with_int
 
struct  error_chunk
 
struct  ether_addr
 
struct  ether_header
 
class  EthernetSerializer
 Converts between EtherFrame and binary (network byte order) Ethernet header. More...
 
class  EtherPhySerializer
 Converts between EtherFrame and binary (network byte order) Ethernet header. More...
 
struct  forward_tsn_chunk
 
struct  forward_tsn_streams
 
struct  forward_tsn_supported_parameter
 
struct  heartbeat_ack_chunk
 
struct  heartbeat_chunk
 
struct  heartbeat_info
 
struct  hmac_algo
 
struct  icmp
 
struct  icmp_ra_addr
 
class  ICMPSerializer
 Converts between ICMPMessage and binary (network byte order) ICMP header. More...
 
class  ICMPv6Serializer
 Converts between ICMPMessage and binary (network byte order) ICMP header. More...
 
struct  Ieee80211OFDMPLCPHeader
 
class  Ieee80211PhySerializer
 
class  Ieee80211Serializer
 Converts between Ieee802.11Frame and binary (network byte order) Ieee802.11 header. More...
 
struct  igmp
 
class  IGMPSerializer
 Converts between IGMPMessage and binary (network byte order) IGMP header. More...
 
struct  in6_addr
 
struct  in_addr
 
struct  incoming_reset_request_parameter
 
struct  init_ack_chunk
 
struct  init_chunk
 
struct  init_cookie_parameter
 
struct  init_ipv4_address_parameter
 
struct  init_ipv6_address_parameter
 
struct  ip
 
struct  ip6_dest
 
struct  ip6_ext
 
struct  ip6_frag
 
struct  ip6_hbh
 
struct  ip6_hdr
 
struct  ip6_opt
 
struct  ip6_opt_jumbo
 
struct  ip6_opt_nsap
 
struct  ip6_opt_router
 
struct  ip6_opt_tunnel
 
struct  ip6_rthdr
 
struct  ip6_rthdr0
 
struct  ip_timestamp
 
class  IPv4OptionDefaultSerializer
 
class  IPv4OptionSerializerBase
 
class  IPv4OptionSerializerRegistrationList
 
class  IPv4Serializer
 Converts between IPv4Datagram and binary (network byte order) IPv4 header. More...
 
class  IPv6Serializer
 Converts between IPv6Datagram and binary (network byte order) IPv6 header. More...
 
struct  nr_sack_chunk
 
struct  outgoing_reset_request_parameter
 
struct  pktdrop_chunk
 
struct  random_parameter
 
struct  sack_chunk
 
struct  sack_duptsn
 
struct  sack_gap
 
class  SCTPSerializer
 Converts between SCTPMessage and binary (network byte order) SCTP header. More...
 
class  SerializerBase
 Converts between cPacket and binary (network byte order) packet. More...
 
class  SerializerRegistrationList
 
struct  shutdown_ack_chunk
 
struct  shutdown_chunk
 
struct  shutdown_complete_chunk
 
struct  snap_header
 
struct  ssn_tsn_reset_request_parameter
 
struct  stream_reset_chunk
 
struct  stream_reset_response_parameter
 
struct  supported_address_types_parameter
 
struct  supported_extensions_parameter
 
struct  tcphdr
 
class  TCPIPchecksum
 Calculates checksum. More...
 
class  TCPSerializer
 Converts between TCPSegment and binary (network byte order) TCP header. More...
 
struct  tlv
 
struct  udphdr
 
class  UDPSerializer
 Converts between UDPPacket and binary (network byte order) UDP header. More...
 

Typedefs

typedef uint8_t u_int8_t
 
typedef uint16_t u_int16_t
 
typedef uint32_t u_int32_t
 
typedef uint64_t u_int64_t
 
typedef unsigned char uchar
 
typedef unsigned short ushort
 
typedef unsigned int uint
 
typedef unsigned long ulong
 
typedef unsigned char u_char
 
typedef unsigned short u_short
 
typedef unsigned int u_int
 
typedef unsigned long u_long
 
typedef u_int32_t in_addr_t
 
typedef u_int16_t n_short
 
typedef u_int32_t n_long
 
typedef u_int32_t n_time
 
typedef uint8_t __uint8_t
 
typedef uint16_t __uint16_t
 
typedef uint32_t __uint32_t
 

Enumerations

enum  PLCPHeaderType {
  OFDM = 0, DSSS = 1, Infrared = 2, FHSS = 3,
  HRDSSS = 4, ERP = 5, HT = 6
}
 
enum  ProtocolGroup {
  UNKNOWN = -1, GLOBAL = 1, IP_PROT, ETHERTYPE,
  LINKTYPE, PHYTYPE
}
 
enum  { LINKTYPE_ETHERNET = 1, LINKTYPE_IEEE802_11 = 105 }
 
enum  { PHYTYPE_ETHERNET = 1 }
 

Functions

 Register_Serializer (ARPPacket, ETHERTYPE, ETHERTYPE_ARP, ARPSerializer)
 
 Register_Serializer (EtherFrame, LINKTYPE, LINKTYPE_ETHERNET, EthernetSerializer)
 
 Register_Serializer (EtherPhyFrame, PHYTYPE, PHYTYPE_ETHERNET, EtherPhySerializer)
 
uint32_t ethernetCRC (const unsigned char *buf, unsigned int bufsize)
 
 Register_Serializer (Ieee80211Frame, LINKTYPE, LINKTYPE_IEEE802_11, Ieee80211Serializer)
 
 Register_Serializer (ICMPMessage, IP_PROT, IP_PROT_ICMP, ICMPSerializer)
 
 Register_Serializer (IGMPMessage, IP_PROT, IP_PROT_IGMP, IGMPSerializer)
 
 Register_Serializer (IPv4Datagram, ETHERTYPE, ETHERTYPE_IPv4, IPv4Serializer)
 
 EXECUTE_ON_SHUTDOWN (ipv4OptionSerializers.clear();)
 
 Register_Serializer (ICMPv6Message, IP_PROT, IP_PROT_IPv6_ICMP, ICMPv6Serializer)
 
 Register_Serializer (IPv6Datagram, ETHERTYPE, ETHERTYPE_IPv6, IPv6Serializer)
 
 Register_Serializer (sctp::SCTPMessage, IP_PROT, IP_PROT_SCTP, SCTPSerializer)
 
 EXECUTE_ON_SHUTDOWN (serializers.clear();)
 
 Register_Serializer (tcp::TCPSegment, IP_PROT, IP_PROT_TCP, TCPSerializer)
 
 Register_Serializer (UDPPacket, IP_PROT, IP_PROT_UDP, UDPSerializer)
 

Variables

struct inet::serializer::snap_header __PACKED__
 
const uint8_t etherbroadcastaddr [ETHER_ADDR_LEN]
 
const uint32_t crc32_tab []
 
IPv4OptionSerializerRegistrationList ipv4OptionSerializers ("IPv4OptionSerializers")
 List of IPv4Option serializers (IPv4OptionSerializerBase) More...
 
SerializerRegistrationList serializers ("default")
 List of packet serializers (SerializerBase) More...
 

Typedef Documentation

typedef uint16_t inet::serializer::__uint16_t
typedef uint32_t inet::serializer::__uint32_t
typedef uint8_t inet::serializer::__uint8_t
typedef unsigned char inet::serializer::u_char
typedef unsigned int inet::serializer::u_int
typedef uint16_t inet::serializer::u_int16_t
typedef uint32_t inet::serializer::u_int32_t
typedef uint64_t inet::serializer::u_int64_t
typedef uint8_t inet::serializer::u_int8_t
typedef unsigned long inet::serializer::u_long
typedef unsigned short inet::serializer::u_short
typedef unsigned char inet::serializer::uchar
typedef unsigned int inet::serializer::uint
typedef unsigned long inet::serializer::ulong
typedef unsigned short inet::serializer::ushort

Enumeration Type Documentation

anonymous enum
Enumerator
LINKTYPE_ETHERNET 
LINKTYPE_IEEE802_11 
44  { // from libpcap
47 };
Definition: SerializerBase.h:46
Definition: SerializerBase.h:45
anonymous enum
Enumerator
PHYTYPE_ETHERNET 
49  {
51 };
Definition: SerializerBase.h:50
Enumerator
OFDM 
DSSS 
Infrared 
FHSS 
HRDSSS 
ERP 
HT 
27 {
28  OFDM = 0,
29  DSSS = 1,
30  Infrared = 2,
31  FHSS = 3,
32  HRDSSS = 4,
33  ERP = 5,
34  HT = 6
35 };
Definition: Ieee80211PLCPHeaders.h:28
Definition: Ieee80211PLCPHeaders.h:34
Definition: Ieee80211PLCPHeaders.h:29
Definition: Ieee80211PLCPHeaders.h:32
Definition: Ieee80211PLCPHeaders.h:30
Definition: Ieee80211PLCPHeaders.h:33
Definition: Ieee80211PLCPHeaders.h:31
Enumerator
UNKNOWN 
GLOBAL 
IP_PROT 
ETHERTYPE 
LINKTYPE 
PHYTYPE 
35  {
36  UNKNOWN = -1, // lookup serializer by classname only
37  GLOBAL = 1,
38  IP_PROT,
39  ETHERTYPE,
40  LINKTYPE,
41  PHYTYPE
42 };
Definition: SerializerBase.h:36
Definition: SerializerBase.h:41
Definition: SerializerBase.h:39
Definition: SerializerBase.h:38
Definition: SerializerBase.h:37
Definition: SerializerBase.h:40

Function Documentation

uint32_t inet::serializer::ethernetCRC ( const unsigned char *  buf,
unsigned int  bufsize 
)

Referenced by inet::physicallayer::APSKPhyFrameSerializer::deserialize(), inet::serializer::Ieee80211Serializer::deserialize(), inet::serializer::EthernetSerializer::deserialize(), inet::physicallayer::APSKPhyFrameSerializer::serialize(), inet::serializer::EthernetSerializer::serialize(), and inet::serializer::Ieee80211Serializer::serialize().

68 {
69  const uint8_t *p = buf;
70  uint32_t crc = ~0U;
71  while (bufsize--)
72  crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
73  crc = crc ^ ~0U;
74 
75  // swap byte order:
76  return (crc >> 24) | ((crc >> 8) & 0x0000FF00) | ((crc << 8) & 0x00FF0000) | (crc << 24);
77 }
const uint32_t crc32_tab[]
Definition: EthernetCRC.cc:21
inet::serializer::EXECUTE_ON_SHUTDOWN ( serializers.clear();  )
inet::serializer::EXECUTE_ON_SHUTDOWN ( ipv4OptionSerializers.clear();  )
inet::serializer::Register_Serializer ( ARPPacket  ,
ETHERTYPE  ,
ETHERTYPE_ARP  ,
ARPSerializer   
)
inet::serializer::Register_Serializer ( tcp::TCPSegment  ,
IP_PROT  ,
IP_PROT_TCP  ,
TCPSerializer   
)
inet::serializer::Register_Serializer ( Ieee80211Frame  ,
LINKTYPE  ,
LINKTYPE_IEEE802_11  ,
Ieee80211Serializer   
)
inet::serializer::Register_Serializer ( EtherFrame  ,
LINKTYPE  ,
LINKTYPE_ETHERNET  ,
EthernetSerializer   
)
inet::serializer::Register_Serializer ( ICMPv6Message  ,
IP_PROT  ,
IP_PROT_IPv6_ICMP  ,
ICMPv6Serializer   
)
inet::serializer::Register_Serializer ( ICMPMessage  ,
IP_PROT  ,
IP_PROT_ICMP  ,
ICMPSerializer   
)
inet::serializer::Register_Serializer ( EtherPhyFrame  ,
PHYTYPE  ,
PHYTYPE_ETHERNET  ,
EtherPhySerializer   
)
inet::serializer::Register_Serializer ( UDPPacket  ,
IP_PROT  ,
IP_PROT_UDP  ,
UDPSerializer   
)
inet::serializer::Register_Serializer ( IGMPMessage  ,
IP_PROT  ,
IP_PROT_IGMP  ,
IGMPSerializer   
)
inet::serializer::Register_Serializer ( IPv4Datagram  ,
ETHERTYPE  ,
ETHERTYPE_IPv4  ,
IPv4Serializer   
)
inet::serializer::Register_Serializer ( sctp::SCTPMessage  ,
IP_PROT  ,
IP_PROT_SCTP  ,
SCTPSerializer   
)
inet::serializer::Register_Serializer ( IPv6Datagram  ,
ETHERTYPE  ,
ETHERTYPE_IPv6  ,
IPv6Serializer   
)

Variable Documentation

struct inet::serializer::data_vector inet::serializer::__PACKED__
const uint32_t inet::serializer::crc32_tab
const uint8_t inet::serializer::etherbroadcastaddr[ETHER_ADDR_LEN]