neigh.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 _NEIGH_H#define _NEIGH_H#ifdef __KERNEL__#include <linux/if_ether.h>#endif#include "dsr.h"#ifndef NO_GLOBALSstruct neighbor_info { struct sockaddr hw_addr; unsigned short id; usecs_t rtt, rto; /* RTT and Round Trip Timeout */ struct timeval last_ack_req;};#endif /* NO_GLOBALS */#ifndef NO_DECLS#ifdef NS2int neigh_tbl_add(struct in_addr neigh_addr, struct hdr_mac *mac);#elseint neigh_tbl_add(struct in_addr neigh_addr, struct ethhdr *ethh);#endifint neigh_tbl_del(struct in_addr neigh_addr);int neigh_tbl_query(struct in_addr neigh_addr, struct neighbor_info *neigh_info);int neigh_tbl_id_inc(struct in_addr neigh_addr);int neigh_tbl_set_rto(struct in_addr neigh_addr, struct neighbor_info *neigh_info);int neigh_tbl_set_ack_req_time(struct in_addr neigh_addr);void neigh_tbl_garbage_timeout(unsigned long data);int neigh_tbl_init(void);void neigh_tbl_cleanup(void);#endif /* NO_DECLS */#endif /* _NEIGH_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?