📄 aodv_socket.h
字号:
/***************************************************************************** * * Copyright (C) 2001 Uppsala University & Ericsson AB. * Copyright (C) 2003 Simon Fraser University and NewMIC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors: Erik Nordstr鰉, <erik.nordstrom@it.uu.se> * : Peter Lee <peter.lee@shaw.ca> * * *****************************************************************************/#ifndef AODV_SOCKET_H#define AODV_SOCKET_H#ifndef NS_NO_GLOBALS//PL:#ifdef _IPV6#include <netinet/ip6.h>#else#include <netinet/ip.h>#endif /* _IPV6 */#include "defs.h"#include "aodv_rerr.h"//PL:#ifdef _IPV6#define IPHDR_SIZE sizeof(struct ip6_hdr)#else#define IPHDR_SIZE sizeof(struct iphdr)#endif /* _IPV6 *//* Set a maximun size for AODV msgs. The RERR is the potentially largest message, depending on how many unreachable destinations that are included. Lets limit them to 100 */#define AODV_MSG_MAX_SIZE RERR_SIZE + 100 * RERR_UDEST_SIZE#define RECV_BUF_SIZE AODV_MSG_MAX_SIZE#define SEND_BUF_SIZE RECV_BUF_SIZE#endif /* NS_NO_GLOBALS */ #ifndef NS_NO_DECLARATIONSvoid aodv_socket_init();//PL:#ifdef _IPV6void aodv_socket_send(AODV_msg * aodv_msg, struct in6_addr dst, int len, u_int8_t ttl, struct dev_info *dev);#elsevoid aodv_socket_send(AODV_msg * aodv_msg, u_int32_t dst, int len, u_int8_t ttl, struct dev_info *dev);#endif /* _IPV6 */AODV_msg *aodv_socket_new_msg();AODV_msg *aodv_socket_queue_msg(AODV_msg * aodv_msg, int size);void aodv_socket_cleanup(void);//PL:#ifdef _IPV6void aodv_socket_process_packet(AODV_msg * aodv_msg, int len, struct in6_addr src, struct in6_addr dst, int ttl, unsigned int ifindex);#elsevoid aodv_socket_process_packet(AODV_msg * aodv_msg, int len, u_int32_t src, u_int32_t dst, int ttl, unsigned int ifindex);#endif /* _IPV6 */#ifdef NS_PORTvoid recvAODVUUPacket(Packet * p);#endif /* NS_PORT */#endif /* NS_NO_DECLARATIONS */#endif /* AODV_SOCKET_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -