bglibs: ipv4.h Source File

bglibs

ipv4.h
1 #ifndef NET__IPV4__H__
2 #define NET__IPV4__H__
3
4 #include "sysdeps.h"
5
11 typedef struct {
13 uint8 addr[4];
14 } ipv4addr;
16 typedef uint16 ipv4port;
17
18 extern const ipv4addr IPV4ADDR_ANY;
19 extern const ipv4addr IPV4ADDR_BROADCAST;
20 extern const ipv4addr IPV4ADDR_LOOPBACK;
21
22 extern int ipv4_parse(const char* s, ipv4addr* addr, const char** end) __DEPRECATED__;
23 extern const char* ipv4_scan(const char* s, ipv4addr* addr);
24 extern const char* ipv4_format(const ipv4addr* addr);
25 extern const char* ipv4_format_reverse(const ipv4addr* addr);
26 extern unsigned fmt_ipv4addr(char* buffer, const ipv4addr* addr);
27 extern unsigned fmt_ipv4addr_reverse(char* buffer, const ipv4addr* addr);
28
31 #endif
iobuf::buffer
char * buffer
Definition: iobuf_common.h:53
fmt_ipv4addr_reverse
unsigned fmt_ipv4addr_reverse(char *buffer, const ipv4addr *addr)
Definition: ipv4_format.c:65
ipv4_format
const char * ipv4_format(const ipv4addr *addr)
Definition: ipv4_format.c:18
ipv4_scan
const char * ipv4_scan(const char *s, ipv4addr *addr)
Definition: ipv4_scan.c:25
fmt_ipv4addr
unsigned fmt_ipv4addr(char *buffer, const ipv4addr *addr)
Definition: ipv4_format.c:46
IPV4ADDR_ANY
const ipv4addr IPV4ADDR_ANY
Definition: ipv4_addr.c:4
IPV4ADDR_BROADCAST
const ipv4addr IPV4ADDR_BROADCAST
Definition: ipv4_addr.c:6
ipv4addr
Definition: ipv4.h:11
ipv4_format_reverse
const char * ipv4_format_reverse(const ipv4addr *addr)
Definition: ipv4_format.c:30
IPV4ADDR_LOOPBACK
const ipv4addr IPV4ADDR_LOOPBACK
Definition: ipv4_addr.c:8
ipv4port
uint16 ipv4port
Definition: ipv4.h:16
ipv4_parse
int ipv4_parse(const char *s, ipv4addr *addr, const char **end) __DEPRECATED__
Definition: ipv4_scan.c:47