mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
934a24e55a
This patch restores/fixes some of the behavior present in pre-netlink ndp(8). 1. Deleting a local address now correctly returns EPERM (instead of ENOENT) 2. ndp -c no longer dumps the entire table while complaining about local addresses 3. Return exit code when deleting entry (e.g. trying ndp -d on a local address is an error) Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42316
28 lines
655 B
C
28 lines
655 B
C
#ifndef _USR_SBIN_NDP_NDP_H_
|
|
#define _USR_SBIN_NDP_NDP_H_
|
|
|
|
#define W_ADDR 36
|
|
#define W_LL 17
|
|
#define W_IF 6
|
|
|
|
struct ndp_opts {
|
|
bool nflag;
|
|
bool tflag;
|
|
int flags;
|
|
time_t expire_time;
|
|
};
|
|
|
|
extern struct ndp_opts opts;
|
|
|
|
bool valid_type(int if_type);
|
|
void ts_print(const struct timeval *tvp);
|
|
char *ether_str(struct sockaddr_dl *sdl);
|
|
char *sec2str(time_t total);
|
|
int getaddr(char *host, struct sockaddr_in6 *sin6);
|
|
int print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag);
|
|
int delete_nl(uint32_t ifindex, char *host, bool warn);
|
|
int set_nl(uint32_t ifindex, struct sockaddr_in6 *dst, struct sockaddr_dl *sdl,
|
|
char *host);
|
|
|
|
#endif
|