X-Git-Url: http://git.onelab.eu/?p=iproute2.git;a=blobdiff_plain;f=include%2Futils.h;h=0f1d1f615fedc9f7a5574a179f9e544c6d7618d4;hp=906e394140c76d8451fa592b9dd0f73472d947e3;hb=b4a5a91c5a4ca186690479ddc0fff26644c98c93;hpb=143d7e99faac73b7f2947e37df31a75738eeadde diff --git a/include/utils.h b/include/utils.h index 906e394..0f1d1f6 100644 --- a/include/utils.h +++ b/include/utils.h @@ -14,6 +14,7 @@ extern int show_details; extern int show_raw; extern int resolve_hosts; extern int oneline; +extern int timestamp; extern char * _SL_; #ifndef IPPROTO_ESP @@ -43,9 +44,12 @@ typedef struct __u8 family; __u8 bytelen; __s16 bitlen; + __u32 flags; __u32 data[4]; } inet_prefix; +#define PREFIXLEN_SPECIFIED 1 + #define DN_MAXADDL 20 #ifndef AF_DECnet #define AF_DECnet 12 @@ -82,8 +86,8 @@ extern int get_s16(__s16 *val, const char *arg, int base); extern int get_u8(__u8 *val, const char *arg, int base); extern int get_s8(__s8 *val, const char *arg, int base); -extern __u8* hexstring_n2a(const __u8 *str, int len, __u8 *buf, int blen); -extern __u8* hexstring_a2n(const __u8 *str, __u8 *buf, int blen); +extern char* hexstring_n2a(const __u8 *str, int len, char *buf, int blen); +extern __u8* hexstring_a2n(const char *str, __u8 *buf, int blen); extern const char *format_host(int af, int len, const void *addr, char *buf, int buflen); @@ -123,4 +127,12 @@ static __inline__ int get_user_hz(void) return __iproute2_user_hz_internal; } +int print_timestamp(FILE *fp); + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +extern int cmdlineno; +extern size_t getcmdline(char **line, size_t *len, FILE *in); +extern int makeargs(char *line, char *argv[], int maxargs); + #endif /* __UTILS_H__ */