![]() |
NetSim Source Code Help
|

Go to the source code of this file.
Data Structures | |
| struct | stru_ospf_packet_header |
| struct | stru_ospf_hello |
| struct | stru_ospf_DD |
| struct | stru_ospf_LSREQ_Object |
| struct | stru_ospf_lsrequest |
| struct | stur_ospf_lsupdate |
| struct | stru_ospf_lsack |
| struct | stru_lsa_header |
| struct | stru_ospf_rlsa_link |
| struct | stru_ospf_router_lsa |
Typedefs | |
| typedef NETSIM_IPAddress | OSPFID |
| typedef struct stru_ospf_DD | OSPFDD |
| typedef struct stru_ospf_DD * | ptrOSPFDD |
| typedef struct stru_ospf_LSREQ_Object | OSPFLSREQOBJ |
| typedef struct stru_ospf_LSREQ_Object * | ptrOSPFLSREQOBJ |
| typedef struct stru_ospf_lsrequest | OSPFLSREQ |
| typedef struct stru_ospf_lsrequest * | ptrOSPFLSREQ |
| typedef struct stur_ospf_lsupdate | OSPFLSUPDATE |
| typedef struct stur_ospf_lsupdate * | ptrOSPFLSUPDATE |
| typedef struct stru_ospf_lsack | OSPFLSACK |
| typedef struct stru_ospf_lsack * | ptrOSPFLSACK |
| typedef struct stru_ospf_rlsa_link | OSPFRLSALINK |
| typedef struct stru_ospf_rlsa_link * | ptrOSPFRLSALINK |
Enumerations | |
| enum | enum_ospf_msg { OSPFMSG_HELLO = 1 , OSPFMSG_DD , OSPFMSG_LSREQUEST , OSPFMSG_LSUPDATE , OSPFMSG_LSACK } |
| enum | OSPFLINKTYPE { OSPFLINKTYPE_POINT_TO_POINT = 1 , OSPFLINKTYPE_TRANSIT = 2 , OSPFLINKTYPE_STUB = 3 , OSPFLINKTYPE_VIRTUAL = 4 } |
| enum | enum_ls_type { LSTYPE_ROUTERLSA = 1 , LSTYPE_NETWORKLSA , LSTYPE_SUMMARYLSA_ROUTER , LSTYPE_SUMMARYLSA_NETWORK , LSTYPE_ASEXTERNALLSA , LSTYPE_UNDEFINED } |
Variables | |
| static char | strOSPFLINKTYPE [][50] = { "NULL","Point_to_Point","Transit","Stub","Virtual" } |
| static char | strLSTYPE [][50] |
| #define DD_INIT_BIT_INDEX 3 |
Definition at line 214 of file OSPF_Msg.h.
| #define DD_IS_INIT | ( | dd | ) | (isBitSet((dd)->IMMS,DD_INIT_BIT_INDEX)) |
Definition at line 220 of file OSPF_Msg.h.
| #define DD_IS_MASTER | ( | dd | ) | (isBitSet((dd)->IMMS,DD_MASTER_BIT_INDEX)) |
Definition at line 222 of file OSPF_Msg.h.
| #define DD_IS_MORE | ( | dd | ) | (isBitSet((dd)->IMMS,DD_MORE_BIT_INDEX)) |
Definition at line 221 of file OSPF_Msg.h.
| #define DD_MASTER_BIT_INDEX 1 |
Definition at line 216 of file OSPF_Msg.h.
| #define DD_MORE_BIT_INDEX 2 |
Definition at line 215 of file OSPF_Msg.h.
| #define DD_SET_INIT | ( | dd | ) | ((dd)->IMMS = (UINT8)setBit((dd)->IMMS,DD_INIT_BIT_INDEX)) |
Definition at line 217 of file OSPF_Msg.h.
| #define DD_SET_MASTER | ( | dd | ) | ((dd)->IMMS = (UINT8)setBit((dd)->IMMS,DD_MASTER_BIT_INDEX)) |
Definition at line 219 of file OSPF_Msg.h.
| #define DD_SET_MORE | ( | dd | ) | ((dd)->IMMS = (UINT8)setBit((dd)->IMMS,DD_MORE_BIT_INDEX)) |
Definition at line 218 of file OSPF_Msg.h.
| #define INTERFACE_MTU_DEFAULT 1500 |
Definition at line 25 of file OSPF_Msg.h.
| #define IP_HDR_LEN 20 |
Definition at line 26 of file OSPF_Msg.h.
| #define OPT_DC_BIT_INDEX 6 |
Definition at line 110 of file OSPF_Msg.h.
| #define OPT_E_BIT_INDEX 2 |
Definition at line 106 of file OSPF_Msg.h.
| #define OPT_EA_BIT_INDEX 5 |
Definition at line 109 of file OSPF_Msg.h.
| #define OPT_IS_DC | ( | opt | ) | (isBitSet((opt),OPT_DC_BIT_INDEX)) |
Definition at line 120 of file OSPF_Msg.h.
| #define OPT_IS_E | ( | opt | ) | (isBitSet((opt),OPT_E_BIT_INDEX)) |
Definition at line 116 of file OSPF_Msg.h.
| #define OPT_IS_EA | ( | opt | ) | (isBitSet((opt),OPT_EA_BIT_INDEX)) |
Definition at line 119 of file OSPF_Msg.h.
| #define OPT_IS_MC | ( | opt | ) | (isBitSet((opt),OPT_MC_BIT_INDEX)) |
Definition at line 117 of file OSPF_Msg.h.
| #define OPT_IS_NP | ( | opt | ) | (isBitSet((opt),OPT_NP_BIT_INDEX)) |
Definition at line 118 of file OSPF_Msg.h.
| #define OPT_MC_BIT_INDEX 3 |
Definition at line 107 of file OSPF_Msg.h.
| #define OPT_NP_BIT_INDEX 4 |
Definition at line 108 of file OSPF_Msg.h.
| #define OPT_SET_DC | ( | opt | ) | ((opt) = setBit((opt),OPT_DC_BIT_INDEX)) |
Definition at line 115 of file OSPF_Msg.h.
| #define OPT_SET_E | ( | opt | ) | ((opt) = setBit((opt),OPT_E_BIT_INDEX)) |
Definition at line 111 of file OSPF_Msg.h.
| #define OPT_SET_EA | ( | opt | ) | ((opt) = setBit((opt),OPT_EA_BIT_INDEX)) |
Definition at line 114 of file OSPF_Msg.h.
| #define OPT_SET_MC | ( | opt | ) | ((opt) = setBit((opt),OPT_MC_BIT_INDEX)) |
Definition at line 112 of file OSPF_Msg.h.
| #define OPT_SET_NP | ( | opt | ) | ((opt) = setBit((opt),OPT_NP_BIT_INDEX)) |
Definition at line 113 of file OSPF_Msg.h.
| #define OSPF_DD_MAX_LSA_COUNT | ( | ) | ((INTERFACE_MTU_DEFAULT - IP_HDR_LEN - OSPFDD_LEN_FIXED - OSPFPACKETHDR_LEN) / OSPFLSAHDR_LEN); |
Definition at line 223 of file OSPF_Msg.h.
| #define OSPF_HDR_GET_LEN | ( | hdr | ) | ((hdr)->Packet_length) |
Definition at line 90 of file OSPF_Msg.h.
| #define OSPF_HDR_GET_MSG | ( | hdr | ) | ((hdr)->ospfMSG) |
Definition at line 93 of file OSPF_Msg.h.
| #define OSPF_HDR_SET_AREAID | ( | hdr, | |
| id | |||
| ) | ((hdr)->AreaId = id) |
Definition at line 87 of file OSPF_Msg.h.
| #define OSPF_HDR_SET_ROUTERID | ( | hdr, | |
| id | |||
| ) | ((hdr)->RouterId = id) |
Definition at line 86 of file OSPF_Msg.h.
| #define OSPF_INITIAL_SEQUENCE_NUMBER 0x80000001 |
Definition at line 27 of file OSPF_Msg.h.
| #define OSPF_MAX_SEQUENCE_NUMBER 0x7FFFFFFF |
Definition at line 28 of file OSPF_Msg.h.
| #define OSPF_MSG_IS_TYPE | ( | hdr, | |
| type | |||
| ) | ((hdr)->Type==type) |
Definition at line 89 of file OSPF_Msg.h.
| #define OSPF_MSG_TYPE | ( | hdr | ) | ((hdr)->Type) |
Definition at line 88 of file OSPF_Msg.h.
| #define OSPF_PACKET_GET_HDR | ( | packet | ) | ((ptrOSPFPACKETHDR)((packet)->pstruAppData->Packet_AppProtocol)) |
Definition at line 91 of file OSPF_Msg.h.
| #define OSPF_PACKET_GET_MSG | ( | packet | ) | (OSPF_HDR_GET_MSG(OSPF_PACKET_GET_HDR(packet))) |
Definition at line 94 of file OSPF_Msg.h.
| #define OSPF_PACKET_GET_MSG_TYPE | ( | packet | ) | (OSPF_MSG_TYPE(OSPF_PACKET_GET_HDR(packet))) |
Definition at line 95 of file OSPF_Msg.h.
| #define OSPF_PACKET_SET_HDR | ( | packet, | |
| hdr | |||
| ) | ((packet)->pstruAppData->Packet_AppProtocol=hdr) |
Definition at line 92 of file OSPF_Msg.h.
| #define OSPF_VERSION 2 |
Definition at line 21 of file OSPF_Msg.h.
| #define OSPFDD_LEN_FIXED 8 |
Definition at line 213 of file OSPF_Msg.h.
| #define OSPFHELLO_LEN_FIXED 20 |
Definition at line 166 of file OSPF_Msg.h.
| #define OSPFLSACK_LEN_FIXED 0 |
Definition at line 340 of file OSPF_Msg.h.
| #define OSPFLSAHDR_LEN 20 |
Definition at line 402 of file OSPF_Msg.h.
| #define OSPFLSREQ_LEN_SINGLE 12 |
Definition at line 265 of file OSPF_Msg.h.
| #define OSPFLSUPDATE_LEN_FIXED 4 |
Definition at line 301 of file OSPF_Msg.h.
| #define OSPFMSG_FROM_PACKETTYPE | ( | type | ) | (type/100==APP_PROTOCOL_OSPF?type%100:0) |
Definition at line 40 of file OSPF_Msg.h.
| #define OSPFMSG_TO_PACKETTYPE | ( | msg | ) | (APP_PROTOCOL_OSPF*100+msg) |
Definition at line 39 of file OSPF_Msg.h.
| #define OSPFPACKETHDR_LEN 24 |
Definition at line 85 of file OSPF_Msg.h.
| #define OSPFRLSA_LEN_FIXED 4 |
Definition at line 460 of file OSPF_Msg.h.
| #define OSPFRLSALINK_LEN_FIXED 12 |
Definition at line 451 of file OSPF_Msg.h.
| typedef struct stru_ospf_DD OSPFDD |
| typedef NETSIM_IPAddress OSPFID |
Definition at line 23 of file OSPF_Msg.h.
| typedef struct stru_ospf_lsack OSPFLSACK |
| typedef struct stru_ospf_lsrequest OSPFLSREQ |
| typedef struct stru_ospf_LSREQ_Object OSPFLSREQOBJ |
| typedef struct stur_ospf_lsupdate OSPFLSUPDATE |
| typedef struct stru_ospf_rlsa_link OSPFRLSALINK |
| typedef struct stru_ospf_DD* ptrOSPFDD |
| typedef struct stru_ospf_lsack* ptrOSPFLSACK |
| typedef struct stru_ospf_lsrequest * ptrOSPFLSREQ |
| typedef struct stru_ospf_LSREQ_Object* ptrOSPFLSREQOBJ |
| typedef struct stur_ospf_lsupdate* ptrOSPFLSUPDATE |
| typedef struct stru_ospf_rlsa_link* ptrOSPFRLSALINK |
| enum enum_ls_type |
| Enumerator | |
|---|---|
| LSTYPE_ROUTERLSA | |
| LSTYPE_NETWORKLSA | |
| LSTYPE_SUMMARYLSA_ROUTER | |
| LSTYPE_SUMMARYLSA_NETWORK | |
| LSTYPE_ASEXTERNALLSA | |
| LSTYPE_UNDEFINED | |
Definition at line 354 of file OSPF_Msg.h.
| enum enum_ospf_msg |
| Enumerator | |
|---|---|
| OSPFMSG_HELLO | |
| OSPFMSG_DD | |
| OSPFMSG_LSREQUEST | |
| OSPFMSG_LSUPDATE | |
| OSPFMSG_LSACK | |
Definition at line 31 of file OSPF_Msg.h.
| enum OSPFLINKTYPE |
| Enumerator | |
|---|---|
| OSPFLINKTYPE_POINT_TO_POINT | |
| OSPFLINKTYPE_TRANSIT | |
| OSPFLINKTYPE_STUB | |
| OSPFLINKTYPE_VIRTUAL | |
Definition at line 43 of file OSPF_Msg.h.
| void OSPF_DD_MSG_FREE | ( | ptrOSPFDD | dd | ) |
| void OSPF_DD_MSG_NEW | ( | ptrOSPFPACKETHDR | hdr | ) |
| ptrOSPFPACKETHDR OSPF_HDR_COPY | ( | ptrOSPFPACKETHDR | hdr | ) |
| void OSPF_HDR_FREE | ( | ptrOSPFPACKETHDR | hdr | ) |
| void OSPF_HDR_INCREASE_LEN | ( | NetSim_PACKET * | packet, |
| UINT16 | len | ||
| ) |
| void OSPF_HDR_SET_MSG | ( | ptrOSPFPACKETHDR | hdr, |
| OSPFMSG | type, | ||
| void * | msg, | ||
| UINT16 | len | ||
| ) |
| ptrOSPFHELLO OSPF_HELLO_MSG_COPY | ( | ptrOSPFHELLO | hello | ) |
| void OSPF_HELLO_MSG_FREE | ( | ptrOSPFHELLO | hello | ) |
Definition at line 45 of file OSPF_Hello.c.
| void OSPF_HELLO_MSG_NEW | ( | ptrOSPFPACKETHDR | hdr | ) |
| ptrOSPFLSAHDR OSPF_LSA_HDR_COPY | ( | ptrOSPFLSAHDR | lsa | ) |
| void OSPF_LSA_HDR_FREE | ( | ptrOSPFLSAHDR | lsa | ) |
| ptrOSPFLSAHDR OSPF_LSA_MSG_COPY | ( | ptrOSPFLSAHDR | hdr | ) |
Definition at line 237 of file OSPF_LSA.c.


| void OSPF_LSA_MSG_FREE | ( | ptrOSPFLSAHDR | hdr | ) |
Definition at line 231 of file OSPF_LSA.c.


| ptrOSPFLSACK OSPF_LSACK_COPY | ( | ptrOSPFLSACK | ack | ) |
| void OSPF_LSACK_FREE | ( | ptrOSPFLSACK | ack | ) |
| void OSPF_LSACK_NEW | ( | ptrOSPFPACKETHDR | hdr | ) |
| ptrOSPFLSREQ OSPF_LSREQ_MSG_COPY | ( | ptrOSPFLSREQ | lsr | ) |
Definition at line 39 of file OSPF_LSREQ.c.
| void OSPF_LSREQ_MSG_FREE | ( | ptrOSPFLSREQ | lsr | ) |
Definition at line 54 of file OSPF_LSREQ.c.
| void OSPF_LSREQ_MSG_NEW | ( | ptrOSPFPACKETHDR | hdr | ) |
| ptrOSPFLSUPDATE OSPF_LSUPDATE_MSG_COPY | ( | ptrOSPFLSUPDATE | lsu | ) |
| void OSPF_LSUPDATE_MSG_FREE | ( | ptrOSPFLSUPDATE | lsu | ) |
| void OSPF_LSUPDATE_MSG_NEW | ( | ptrOSPFPACKETHDR | hdr | ) |
| NetSim_PACKET * OSPF_PACKET_NEW | ( | double | time, |
| OSPFMSG | type, | ||
| NETSIM_ID | d, | ||
| NETSIM_ID | in | ||
| ) |
Definition at line 106 of file OSPF_Msg.c.


| void OSPF_SEND_PACKET | ( | NetSim_PACKET * | packet | ) |
| ptrOSPFRLSA OSPFLSAINFO_COPY_RLSA | ( | ptrOSPFRLSA | rlsa | ) |
| void OSPFLSAINFO_FREE_RLSA | ( | ptrOSPFRLSA | rlsa | ) |
| bool validate_ospf_packet | ( | NetSim_PACKET * | packet, |
| NETSIM_ID | d, | ||
| NETSIM_ID | in | ||
| ) |
Definition at line 202 of file OSPF_Msg.c.


|
static |
Definition at line 363 of file OSPF_Msg.h.
|
static |
Definition at line 50 of file OSPF_Msg.h.