mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
79278872ad
arp(8) has traditionally supported filtering by interface via -i and by hostname. However, this functionality was omitted from the initial netlink-ification of arp. This patch re-introduces this filtering functionality. This patch also improves by-interface filtering by storing and using the ifindex of the requested interface for filtering instead of comparing interface name strings Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate")
24 lines
548 B
C
24 lines
548 B
C
#ifndef _USR_SBIN_ARP_ARP_H_
|
|
#define _USR_SBIN_ARP_ARP_H_
|
|
|
|
int valid_type(int type);
|
|
struct sockaddr_in *getaddr(char *host);
|
|
int print_entries_nl(uint32_t ifindex, struct in_addr addr);
|
|
|
|
struct arp_opts {
|
|
bool aflag;
|
|
bool nflag;
|
|
time_t expire_time;
|
|
int flags;
|
|
char *rifname;
|
|
unsigned int rifindex;
|
|
};
|
|
extern struct arp_opts opts;
|
|
|
|
int print_entries_nl(uint32_t ifindex, struct in_addr addr);
|
|
int delete_nl(uint32_t ifindex, char *host);
|
|
int set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl,
|
|
char *host);
|
|
|
|
#endif
|