📄 dymo_pkt_support.h
字号:
/* dymo_pkt_support.h */
/* Data Structures used for the packet fields */
/* used in the DYMO RE and RERR packets */
/****************************************/
/* Copyright (c) 1986-2003 */
/* by OPNET Technologies, Inc. */
/* (A Delaware Corporation) */
/* 7255 Woodmont Av., Suite 250 */
/* Bethesda, MD 20814, U.S.A. */
/* All Rights Reserved. */
/****************************************/
/* Protect against multiple includes. */
#ifndef _DYMO_PKT_SUPPORT_H_INCLUDED_
#define _DYMO_PKT_SUPPORT_H_INCLUDED_
#include <ip_addr_v4.h>
#include <ip_rte_v4.h>
#if defined (__cplusplus)
extern "C" {
#endif
/********* CONSTANTS ***********/
/* Type of packet */
#define DYMOC_ROUTE_ELEMENT 1
#define DYMOC_ROUTE_ERROR 2
#define DYMOC_UNSUP_ERROR 3
#define DYMOC_HELLO 4 /*Not yet defined in Dymo 01*/
/* Packet Sizes in bits */
#define DYMOC_RE_IPV4_SIZE 184 /* Including the first RE Block */
#define DYMOC_RE_IPV6_SIZE 376 /* Including the first RE Block */
#define DYMOC_HELLO_IPV4_SIZE 160 /* Same as AODV RREP. Keep this as same for Comparision Purpose*/
#define DYMOC_HELLO_IPV6_SIZE 352
/***** Enumerated Data Types ******/
typedef enum
{
DymoC_Link_Break_Detect,
DymoC_Data_Packet_No_Route,
DymoC_Rerr_Received
} DymoC_Rerr_Process;
/******** Data Structures *********/
/* Options in the DYMO packet */
typedef struct
{
int elem_type;
void* value_ptr;
} DymoT_Packet_Option;
/* Route Element Option */
typedef struct
{
Boolean gateway_flag;
int prefix;
int re_hop_count;
InetT_Address re_node_addr;
int re_node_seq_num;
} DymoT_Re_Block_Entry;
typedef struct
{
int elem_ttl;
int elem_len;
Boolean ignore_flag;
InetT_Address elem_target_addr;
int elem_target_seq_num;
int t_hop_cnt;
Boolean ack_flag;
List* reblock_lptr;
} DymoT_Route_Ele;
/* Route Error Option */
typedef struct
{
InetT_Address unreachable_dest;
int unreachable_dest_seq_num;
} DymoT_Unreachable_Node;
typedef struct
{
int elem_ttl;
int elem_len;
Boolean ignore_flag;
List* unreachable_dest_lptr; /* Each element is DymoT_Unreachable_Node */
} DymoT_Rerr;
/* Hello Option */
/*Added based on AODV RREP. Contents have to be changed once Dymo has a proposal for Hello Packet format*/
typedef struct
{
Boolean repair_flag;
Boolean ack_required_flag;
int hop_count;
InetT_Address dest_addr;
int dest_seq_num;
InetT_Address src_addr;
double lifetime;
} DymoT_Hello;
#if defined (__cplusplus)
} /* end of 'extern "C" {' */
#endif
/* End if for protection against multiple includes. */
#endif /*_DYMO_PKT_SUPPORT_H_INCLUDED_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -