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
char * buffer
Definition: iobuf_common.h:53
unsigned fmt_ipv4addr_reverse(char *buffer, const ipv4addr *addr)
Definition: ipv4_format.c:65
const char * ipv4_format(const ipv4addr *addr)
Definition: ipv4_format.c:18
const char * ipv4_scan(const char *s, ipv4addr *addr)
Definition: ipv4_scan.c:25
unsigned fmt_ipv4addr(char *buffer, const ipv4addr *addr)
Definition: ipv4_format.c:46
const ipv4addr IPV4ADDR_ANY
Definition: ipv4_addr.c:4
const ipv4addr IPV4ADDR_BROADCAST
Definition: ipv4_addr.c:6
Definition: ipv4.h:11
const char * ipv4_format_reverse(const ipv4addr *addr)
Definition: ipv4_format.c:30
const ipv4addr IPV4ADDR_LOOPBACK
Definition: ipv4_addr.c:8
uint16 ipv4port
Definition: ipv4.h:16
int ipv4_parse(const char *s, ipv4addr *addr, const char **end) __DEPRECATED__
Definition: ipv4_scan.c:47