NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
stru_NetSim_ICMP_DestinationUnreachableMessage Struct Reference

#include <ICMP.h>

Data Fields

char Type
 
char code
 
unsigned short int Checksum
 
unsigned int unused
 
void * InternetHeader
 

Detailed Description

As per RFC 792 page 3 :
Destination Unreachable Message
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| unused |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Internet Header + 64 bits of Original Data Datagram |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Definition at line 60 of file ICMP.h.

Field Documentation

◆ Checksum

unsigned short int stru_NetSim_ICMP_DestinationUnreachableMessage::Checksum

The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type. For computing the checksum , the checksum field should be zero. This checksum may be replaced in the future.

Definition at line 73 of file ICMP.h.

◆ code

char stru_NetSim_ICMP_DestinationUnreachableMessage::code
0 = net unreachable;
1 = host unreachable;
2 = protocol unreachable;
3 = port unreachable;
4 = fragmentation needed and DF set;
5 = source route failed.

Definition at line 63 of file ICMP.h.

◆ InternetHeader

void* stru_NetSim_ICMP_DestinationUnreachableMessage::InternetHeader

The internet header plus the first 64 bits of the original datagram's data. This data is used by the host to match the message to the appropriate process. If a higher level protocol uses port numbers, they are assumed to be in the first 64 data bits of the original datagram's data.

Definition at line 80 of file ICMP.h.

◆ Type

char stru_NetSim_ICMP_DestinationUnreachableMessage::Type

Definition at line 62 of file ICMP.h.

◆ unused

unsigned int stru_NetSim_ICMP_DestinationUnreachableMessage::unused

Definition at line 79 of file ICMP.h.


The documentation for this struct was generated from the following file: