File: scanfmt.h

package info (click to toggle)
pcaputils 0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 372 kB
  • sloc: ansic: 2,945; sh: 44; makefile: 38
file content (25 lines) | stat: -rw-r--r-- 713 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef RSEUTIL_SCANFMT_H
#define RSEUTIL_SCANFMT_H

#define FMT_IP4 20
#define FMT_IP6 40
#define FMT_MAC 20

extern unsigned fmt_ulong(char *s, unsigned long u);
extern unsigned scan_ulong(const char *s, unsigned long *u);

extern unsigned fmt_ip4(char *s, const char ip[4]);
extern unsigned scan_ip4(const char *s, char ip[4]);

extern unsigned fmt_ip6(char *s, const char ip[16]);
extern unsigned scan_ip6(const char *s, char ip[16]);

extern unsigned fmt_xlong(char *s, unsigned long u);
extern unsigned scan_xlong(const char *s, unsigned long *d);

extern int scan_fromhex(unsigned char c);

extern unsigned fmt_mac(char *s, const char mac[6]);
extern unsigned scan_mac(const char *s, char mac[6]);

#endif