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

#include <DSR.h>

Collaboration diagram for stru_NetSim_DSR_RREQ_Option:

Data Fields

DSR_OPTION_TYPE nOptionType
 
unsigned int nOptDataLen:8
 
unsigned int nIdentification:16
 
NETSIM_IPAddress targetAddress
 
NETSIM_IPAddressaddress
 

Detailed Description

6.2. Route Request Option
The Route Request option in a DSR Options header is encoded as
follows:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Option Type | Opt Data Len | Identification |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Target Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[1] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[2] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[n] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Definition at line 216 of file DSR.h.

Field Documentation

◆ address

NETSIM_IPAddress* stru_NetSim_DSR_RREQ_Option::address

Address[i] is the IPv4 address of the i-th node recorded in the Route Request option. The address given in the Source Address field in the IP header is the address of the initiator of the Route Discovery and MUST NOT be listed in the Address[i] fields; the address given in Address[1] is thus the IPv4 address of the first node on the path after the initiator. The number of addresses present in this field is indicated by the Opt Data Len field in the option (n = (Opt Data Len - 6) / 4). Each node propagating the Route Request adds its own address to this list, increasing the Opt Data Len value by 4 octets.

Definition at line 251 of file DSR.h.

◆ nIdentification

unsigned int stru_NetSim_DSR_RREQ_Option::nIdentification

A unique value generated by the initiator (original sender) of the Route Request. Nodes initiating a Route Request generate a new Identification value for each Route Request, for example based on a sequence number counter of all Route Requests initiated by the node.

This value allows a receiving node to determine whether it has recently seen a copy of this Route Request. If this Identification value (for this IP Source address and Target Address) is found by this receiving node in its Route Request Table (in the cache of Identification values in the entry there for this initiating node), this receiving node MUST discard the Route Request. When a Route Request is propagated, this field MUST be copied from the received copy of the Route Request being propagated.

Definition at line 231 of file DSR.h.

◆ nOptDataLen

unsigned int stru_NetSim_DSR_RREQ_Option::nOptDataLen

8-bit unsigned integer. Length of the option, in octets, excluding the Option Type and Opt Data Len fields. MUST be set equal to (4 * n) + 6, where n is the number of addresses in the Route Request Option.

Definition at line 224 of file DSR.h.

◆ nOptionType

DSR_OPTION_TYPE stru_NetSim_DSR_RREQ_Option::nOptionType

nOptionType = 1 Nodes not understanding this option will ignore this option.

Definition at line 218 of file DSR.h.

◆ targetAddress

NETSIM_IPAddress stru_NetSim_DSR_RREQ_Option::targetAddress

Definition at line 249 of file DSR.h.


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