version 1.1, 2012/02/21 23:32:47
|
version 1.1.1.3, 2021/03/17 00:39:23
|
Line 10
|
Line 10
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/param.h> |
#include <sys/param.h> |
|
#include <netinet/in.h> |
#include <netinet/in_systm.h> |
#include <netinet/in_systm.h> |
#include <netinet/ip.h> |
#include <netinet/ip.h> |
|
|
Line 40
|
Line 41
|
* FUNCTIONS |
* FUNCTIONS |
*/ |
*/ |
|
|
extern int IpShowRoutes(Context ctx, int ac, char *av[], void *arg); | extern int IpShowRoutes(Context ctx, int ac, const char *const av[], const void *arg); |
extern int IpAddrInRange(struct u_range *range, struct u_addr *addr); |
extern int IpAddrInRange(struct u_range *range, struct u_addr *addr); |
|
|
extern int ParseAddr(const char *s, struct u_addr *addr, u_char allow); |
extern int ParseAddr(const char *s, struct u_addr *addr, u_char allow); |
extern int ParseRange(const char *s, struct u_range *range, u_char allow); |
extern int ParseRange(const char *s, struct u_range *range, u_char allow); |
extern struct sockaddr_storage * ParseAddrPort(int ac, char *av[], u_char allow); | extern struct sockaddr_storage * ParseAddrPort(int ac, const char *const av[], u_char allow); |
|
|
extern sa_family_t u_addrfamily(struct u_addr *addr); |
extern sa_family_t u_addrfamily(struct u_addr *addr); |
extern sa_family_t u_rangefamily(struct u_range *range); |
extern sa_family_t u_rangefamily(struct u_range *range); |
Line 53
|
Line 54
|
extern char *u_addrtoa(struct u_addr *addr, char *dst, size_t size); |
extern char *u_addrtoa(struct u_addr *addr, char *dst, size_t size); |
extern char *u_rangetoa(struct u_range *range, char *dst, size_t size); |
extern char *u_rangetoa(struct u_range *range, char *dst, size_t size); |
|
|
extern struct u_addr *u_addrcopy(const struct u_addr *src, struct u_addr *dst); | extern void u_addrcopy(const struct u_addr *src, struct u_addr *dst); |
extern struct u_addr *u_rangecopy(const struct u_range *src, struct u_range *dst); | extern void u_rangecopy(const struct u_range *src, struct u_range *dst); |
|
|
extern struct u_addr *in_addrtou_addr(const struct in_addr *src, struct u_addr *dst); | extern void in_addrtou_addr(const struct in_addr *src, struct u_addr *dst); |
extern struct u_addr *in6_addrtou_addr(const struct in6_addr *src, struct u_addr *dst); | extern void in6_addrtou_addr(const struct in6_addr *src, struct u_addr *dst); |
|
|
extern struct in_addr *u_addrtoin_addr(const struct u_addr *src, struct in_addr *dst); | extern void u_addrtoin_addr(const struct u_addr *src, struct in_addr *dst); |
extern struct in6_addr *u_addrtoin6_addr(const struct u_addr *src, struct in6_addr *dst); | extern void u_addrtoin6_addr(const struct u_addr *src, struct in6_addr *dst); |
|
|
extern struct u_range *in_addrtou_range(const struct in_addr *src, u_char width, struct u_range *dst); | extern void in_addrtou_range(const struct in_addr *src, u_char width, struct u_range *dst); |
extern struct u_range *in6_addrtou_range(const struct in6_addr *src, u_char width, struct u_range *dst); | extern void in6_addrtou_range(const struct in6_addr *src, u_char width, struct u_range *dst); |
|
|
extern struct sockaddr_storage *u_rangetosockaddrs(struct u_range *range, struct sockaddr_storage *dst, struct sockaddr_storage *msk); | extern void u_rangetosockaddrs(struct u_range *range, struct sockaddr_storage *dst, struct sockaddr_storage *msk); |
extern struct sockaddr_storage *u_addrtosockaddr(struct u_addr *addr, in_port_t port, struct sockaddr_storage *dst); | extern void u_addrtosockaddr(struct u_addr *addr, in_port_t port, struct sockaddr_storage *dst); |
extern void sockaddrtou_addr(struct sockaddr_storage *src, struct u_addr *addr, in_port_t *port); | extern void sockaddrtou_addr(struct sockaddr_storage *src, struct u_addr *addr, in_port_t *port); |
|
|
extern struct u_addr *u_addrclear(struct u_addr *addr); | extern void u_addrclear(struct u_addr *addr); |
extern struct u_range *u_rangeclear(struct u_range *range); | extern void u_rangeclear(struct u_range *range); |
|
|
extern int u_addrempty(struct u_addr *addr); |
extern int u_addrempty(struct u_addr *addr); |
extern int u_rangeempty(struct u_range *range); |
extern int u_rangeempty(struct u_range *range); |