dsr-ack.h

来自「Ad-hoc网络路由协议DSR的linux下实现」· C头文件 代码 · 共 48 行

H
48
字号
/* Copyright (C) Uppsala University * * This file is distributed under the terms of the GNU general Public * License (GPL), see the file LICENSE * * Author: Erik Nordström, <erikn@it.uu.se> */#ifndef _DSR_ACK_H#define _DSR_ACK_H#include "dsr.h"#ifndef NO_GLOBALSstruct dsr_ack_req_opt {	u_int8_t type;	u_int8_t length;	u_int16_t id;};struct dsr_ack_opt {	u_int8_t type;	u_int8_t length;	u_int16_t id;	u_int32_t src;	u_int32_t dst;};#define DSR_ACK_REQ_HDR_LEN sizeof(struct dsr_ack_req_opt)#define DSR_ACK_REQ_OPT_LEN (DSR_ACK_REQ_HDR_LEN - 2)#define DSR_ACK_HDR_LEN sizeof(struct dsr_ack_opt)#define DSR_ACK_OPT_LEN (DSR_ACK_HDR_LEN - 2)int dsr_ack_add_ack_req(struct in_addr neigh);#endif				/* NO_GLOBALS */#ifndef NO_DECLSstruct dsr_ack_req_opt *dsr_ack_req_opt_add(struct dsr_pkt *dp,					    unsigned short id);int dsr_ack_req_opt_recv(struct dsr_pkt *dp, struct dsr_ack_req_opt *areq);int dsr_ack_opt_recv(struct dsr_ack_opt *ack);int dsr_ack_req_send(struct in_addr neigh_addr, unsigned short id);int dsr_ack_send(struct in_addr dst, unsigned short id);#endif				/* NO_DECLS */#endif				/* _DSR_ACK */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?