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

#include <DSR.h>

Collaboration diagram for stru_NetSim_DSR_SourceRouteOption:

Data Fields

DSR_OPTION_TYPE nOptionType
 
unsigned int nOptDataLen:8
 
unsigned int F:1
 
unsigned int L:1
 
unsigned int nReserved:4
 
unsigned int nSalvage:4
 
unsigned int nSegsLeft:4
 
NETSIM_IPAddressAddress
 

Detailed Description

6.7. DSR Source Route Option
The DSR Source Route 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 |F|L|Reservd|Salvage| Segs Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[1] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[2] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address[n] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
NETSIM_IPAddress * Address
Definition DSR.h:182

Definition at line 127 of file DSR.h.

Field Documentation

◆ Address

NETSIM_IPAddress* stru_NetSim_DSR_SourceRouteOption::Address

The sequence of addresses of the source route. In routing and forwarding the packet, the source route is processed as described in Sections 8.1.3 and 8.1.5. 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 - 2) / 4).

Definition at line 182 of file DSR.h.

◆ F

unsigned int stru_NetSim_DSR_SourceRouteOption::F

Set to indicate that the first hop indicated by the DSR Source Route option 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 DSR Source Route option. 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 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 141 of file DSR.h.

◆ L

unsigned int stru_NetSim_DSR_SourceRouteOption::L

Set to indicate that the last hop indicated by the DSR Source Route option 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 DSR Source Route option. 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 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 154 of file DSR.h.

◆ nOptDataLen

unsigned int stru_NetSim_DSR_SourceRouteOption::nOptDataLen

8-bit unsigned integer. Length of the option, in octets, excluding the Option Type and Opt Data Len fields. For the format of the DSR Source Route option defined here, this field MUST be set to the value (n * 4) + 2, where n is the number of addresses present in the Address[i] fields.

Definition at line 133 of file DSR.h.

◆ nOptionType

DSR_OPTION_TYPE stru_NetSim_DSR_SourceRouteOption::nOptionType

nOptionType = 96 Nodes not understanding this option will drop the packet.

Definition at line 129 of file DSR.h.

◆ nReserved

unsigned int stru_NetSim_DSR_SourceRouteOption::nReserved

MUST be sent as 0 and ignored on reception.

Definition at line 167 of file DSR.h.

◆ nSalvage

unsigned int stru_NetSim_DSR_SourceRouteOption::nSalvage

A 4-bit unsigned integer. Count of number of times that this packet has been salvaged as a part of DSR routing.

Definition at line 170 of file DSR.h.

◆ nSegsLeft

unsigned int stru_NetSim_DSR_SourceRouteOption::nSegsLeft

Segments Left (Segs Left) Number of route segments remaining, i.e., number of explicitly listed intermediate nodes still to be visited before reaching the final destination.

Definition at line 175 of file DSR.h.


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