191fbe081SAlexander V. Chernikov #ifndef _USR_SBIN_NDP_NDP_H_ 291fbe081SAlexander V. Chernikov #define _USR_SBIN_NDP_NDP_H_ 391fbe081SAlexander V. Chernikov 491fbe081SAlexander V. Chernikov #define W_ADDR 36 591fbe081SAlexander V. Chernikov #define W_LL 17 691fbe081SAlexander V. Chernikov #define W_IF 6 791fbe081SAlexander V. Chernikov 891fbe081SAlexander V. Chernikov struct ndp_opts { 991fbe081SAlexander V. Chernikov bool nflag; 1091fbe081SAlexander V. Chernikov bool tflag; 1191fbe081SAlexander V. Chernikov int flags; 1291fbe081SAlexander V. Chernikov time_t expire_time; 13*12c04071SZhenlei Huang int repeat; 1491fbe081SAlexander V. Chernikov }; 1591fbe081SAlexander V. Chernikov 1691fbe081SAlexander V. Chernikov extern struct ndp_opts opts; 1791fbe081SAlexander V. Chernikov 1891fbe081SAlexander V. Chernikov bool valid_type(int if_type); 1991fbe081SAlexander V. Chernikov void ts_print(const struct timeval *tvp); 2091fbe081SAlexander V. Chernikov char *ether_str(struct sockaddr_dl *sdl); 2191fbe081SAlexander V. Chernikov char *sec2str(time_t total); 2291fbe081SAlexander V. Chernikov int getaddr(char *host, struct sockaddr_in6 *sin6); 2391fbe081SAlexander V. Chernikov int print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag); 24934a24e5SR. Christian McDonald int delete_nl(uint32_t ifindex, char *host, bool warn); 2591fbe081SAlexander V. Chernikov int set_nl(uint32_t ifindex, struct sockaddr_in6 *dst, struct sockaddr_dl *sdl, 2691fbe081SAlexander V. Chernikov char *host); 2791fbe081SAlexander V. Chernikov 2891fbe081SAlexander V. Chernikov #endif 29