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

#include <DSR.h>

Collaboration diagram for stru_NetSim_DSR_RREP_Option:

Data Fields

DSR_OPTION_TYPE nOptionType
 
unsigned int nOptDataLen:8
 
unsigned int nLastHopExternal:1
 
unsigned int nReserved:7
 
NETSIM_IPAddressAddress
 

Detailed Description

6.3 Route Reply Option
The Route Reply 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 |L| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[1] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[2] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[n] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
NETSIM_IPAddress * Address
Definition DSR.h:317

Definition at line 285 of file DSR.h.

Field Documentation

◆ Address

NETSIM_IPAddress* stru_NetSim_DSR_RREP_Option::Address

The source route being returned by the Route Reply. The route indicates a sequence of hops, originating at the source node specified in the Destination Address field of the IP header of the packet carrying the Route Reply, through each of the Address[i] nodes in the order listed in the Route Reply, ending at the node indicated by Address[n]. The number of addresses present in the Address[1..n] field is indicated by the Opt Data Len field in the option (n = (Opt Data Len - 1) / 4).

Definition at line 317 of file DSR.h.

◆ nLastHopExternal

unsigned int stru_NetSim_DSR_RREP_Option::nLastHopExternal

Set to indicate that the last hop given by the Route Reply (the link from Address[n-1] to Address[n]) is actually an arbitrary path in a network external to the DSR network; the exact route outside the DSR network is not represented in the Route Reply. Nodes caching this hop in their Route Cache MUST flag the cached hop with the External flag. Such hops MUST NOT be returned in a cached Route Reply generated from this Route Cache entry, and selection of routes from the Route Cache to route a packet being sent SHOULD prefer routes that contain no hops flagged as External.

Definition at line 300 of file DSR.h.

◆ nOptDataLen

unsigned int stru_NetSim_DSR_RREP_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) + 1, where n is the number of addresses in the Route Reply Option.

Definition at line 293 of file DSR.h.

◆ nOptionType

DSR_OPTION_TYPE stru_NetSim_DSR_RREP_Option::nOptionType

Option Type = 2 Nodes not understanding this option will ignore this option.

Definition at line 287 of file DSR.h.

◆ nReserved

unsigned int stru_NetSim_DSR_RREP_Option::nReserved

MUST be sent as 0 and ignored on reception.

Definition at line 313 of file DSR.h.


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