Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
IP_PacketHeader Struct Reference
IP Packet memory map. More...
#include <ip.h>
Data Fields | |
unsigned | version:4 |
4 bits that contain the version, that specifies if it's an IPv4 or IPv6 packet, | |
unsigned | header_bytes_div4:4 |
4 bits that contain the Internet Header Length which is the length of the header in multiples of 4 bytes (eg. 5 means 20 bytes). | |
unsigned | tos:8 |
8 bits that contain the Type of Service, also referred to as Quality of Service (QoS), which describes what priority the packet should have, | |
u16 | packet_bytes |
16 bits that contain the total length of the IP packet (datagram) in bytes, | |
u16 | fragment_id |
16 bits that contain an identification tag to help reconstruct the packet from several fragments, | |
unsigned | unused_0:1 |
3 bits that contain a zero, a flag that says whether the packet is allowed to be fragmented or not (DF: Don't fragment), and a flag to state whether more fragments of a packet follow (MF: More Fragments) | |
unsigned | fragment_offset:13 |
13 bits that contain the fragment offset, a field to identify position of fragment within original packet | |
unsigned | ttl:8 |
8 bits that contain the Time to live (TTL) which is the number of hops (router, computer or device along a network) the packet is allowed to pass before it dies (for example, a packet with a TTL of 16 will be allowed to go across 16 routers to get to its destination before it is discarded), | |
unsigned | protocol:8 |
8 bits that contain the protocol (TCP, UDP, ICMP, etc...) 0x01 ICMP 0x06 TCP 0x11 UDP | |
u16 | header_checksum |
16 bits that contain the Header Checksum, a number used in error detection, | |
IP_Address | source |
32 bits that contain the source IP address, | |
IP_Address | destination |
32 bits that contain the destination address. | |
unsigned char | data [] |
Zero-length field for memory mapping the packet data. |
Detailed Description
IP Packet memory map.
Definition at line 23 of file ip.h.
Field Documentation
unsigned char data[] |
unsigned fragment_offset |
unsigned header_bytes_div4 |
unsigned protocol |
unsigned tos |
unsigned ttl |
8 bits that contain the Time to live (TTL) which is the number of hops (router, computer or device along a network) the packet is allowed to pass before it dies (for example, a packet with a TTL of 16 will be allowed to go across 16 routers to get to its destination before it is discarded),
unsigned unused_0 |
Generated on Tue Jul 12 2022 11:59:40 by
