?? packet_queue.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 PACKET_QUEUE_H#define PACKET_QUEUE_H#ifndef NS_NO_GLOBALS#include "defs.h"#define MAX_QUEUE_LENGTH 100//PL:#ifdef _IPV6struct q_pkt { struct in6_addr dest_addr;#elsestruct q_pkt { u_int32_t dest_addr;#endif /* _IPV6 */#ifdef NS_PORT Packet *p;#else unsigned long id;#endif //int to_internet; struct q_pkt *next;};struct packet_queue { struct q_pkt *head; struct q_pkt *tail; unsigned int len;};#endif /* NS_NO_GLOBALS */#ifndef NS_NO_DECLARATIONSstruct packet_queue PQ;#ifdef NS_PORTvoid packet_queue_add(Packet * p, u_int32_t dest_addr);#else /* NS_PORT *///PL:#ifdef _IPV6void packet_queue_add(unsigned long id, struct in6_addr dest_addr/*,int to_internet*/);//void packet_queue_set_i(struct in6_addr dest_addr);#else /* _IPV6 */void packet_queue_add(unsigned long id, u_int32_t dest_addr);#endif /* _IPV6 */#endif /* NS_PORT */void packet_queue_init();void packet_queue_destroy(); //PL:#ifdef _IPV6int packet_queue_drop(struct in6_addr dest_addr);int packet_queue_send(struct in6_addr dest_addr);#elseint packet_queue_drop(u_int32_t dest_addr);int packet_queue_send(u_int32_t dest_addr);#endif /* _IPV6 */#endif /* NS_NO_DECLARATIONS */#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -