INET Framework for OMNeT++/OMNEST
ISISadj Struct Reference

#include <ISIStypes.h>

List of all members.

Public Member Functions

bool operator< (const ISISadj &adj2) const

Public Attributes

unsigned char sysID [6]
unsigned char areaID [3]
MACAddress mac
bool state
ISISTimertimer
int gateIndex
bool network

Detailed Description

Structure for storing info about neighbours

Definition at line 84 of file ISIStypes.h.


Member Function Documentation

bool ISISadj::operator< ( const ISISadj adj2) const [inline]

Definition at line 95 of file ISIStypes.h.

                                              {

        for (unsigned int j = 0; j < ISIS_AREA_ID; j++){
            if(areaID[j] < adj2.areaID[j]){
                return true; //first is smaller, so return true
            }else if(areaID[j] > adj2.areaID[j]){
                return false; //first is bigger, so return false
            }
            //if it's equal then continue to next one
        }
        //AreaIDs match, so compare system IDs

        for (unsigned int i = 0; i < ISIS_SYSTEM_ID; i++){
            if(sysID[i] < adj2.sysID[i]){
                return true; //first is smaller, so return true
            }else if(sysID[i] > adj2.sysID[i]){
                return false; //first is bigger, so return false
            }
            //if it's equal then continue to next one
        }

        //if the first MAC address is smaller, return true
        if(mac.compareTo(adj2.mac) < 0){
            return true;
        }

        //if they're equal, return false
        return false;
    }

Member Data Documentation

unsigned char ISISadj::areaID[3]

neighbour areaID

Definition at line 87 of file ISIStypes.h.

Referenced by ISIS::handleL1HelloMsg(), ISIS::handleL2HelloMsg(), ISIS::handlePTPHelloMsg(), and operator<().

index of gate, which is neighbour connected to

Definition at line 91 of file ISIStypes.h.

Referenced by ISIS::handleL1HelloMsg(), ISIS::handleL2HelloMsg(), and ISIS::handlePTPHelloMsg().

network type, true = broadcast, false = point-to-point

Definition at line 92 of file ISIStypes.h.

Referenced by ISIS::handleL1HelloMsg(), ISIS::handleL2HelloMsg(), and ISIS::handlePTPHelloMsg().

adjacency state has to be 2-way; 0 = only 1 way, 1 = 2-way (hello received from adj router)

Definition at line 89 of file ISIStypes.h.

Referenced by ISIS::addTLV(), ISIS::handleL1HelloMsg(), ISIS::handleL2HelloMsg(), ISIS::handlePTPHelloMsg(), ISIS::sendPTPHelloMsg(), and ISIS::updateMyLSP().

unsigned char ISISadj::sysID[6]

timer set to hold time and reseted every time hello from neighbour is received

Definition at line 90 of file ISIStypes.h.

Referenced by ISIS::handleL1HelloMsg(), ISIS::handleL2HelloMsg(), and ISIS::handlePTPHelloMsg().


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