xref: /freebsd/usr.sbin/ndp/ndp.h (revision 12c04071cf18d1b00ffcc7058fb01f4393163ede)
1 #ifndef _USR_SBIN_NDP_NDP_H_
2 #define _USR_SBIN_NDP_NDP_H_
3 
4 #define W_ADDR	36
5 #define W_LL	17
6 #define W_IF	6
7 
8 struct ndp_opts {
9 	bool nflag;
10 	bool tflag;
11 	int flags;
12 	time_t expire_time;
13 	int repeat;
14 };
15 
16 extern struct ndp_opts opts;
17 
18 bool valid_type(int if_type);
19 void ts_print(const struct timeval *tvp);
20 char *ether_str(struct sockaddr_dl *sdl);
21 char *sec2str(time_t total);
22 int getaddr(char *host, struct sockaddr_in6 *sin6);
23 int print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag);
24 int delete_nl(uint32_t ifindex, char *host, bool warn);
25 int set_nl(uint32_t ifindex, struct sockaddr_in6 *dst, struct sockaddr_dl *sdl,
26     char *host);
27 
28 #endif
29