UniRec  2.9.3
Data Structures | Functions
ipaddr.h File Reference

Structure to store both IPv4 and IPv6 addresses and associated functions. More...

#include "inline.h"
#include <stdint.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/types.h>

Go to the source code of this file.

Data Structures

union  ip_addr_t
 

Functions

INLINE int ip_is4 (const ip_addr_t *addr)
 
INLINE int ip_is6 (const ip_addr_t *addr)
 
INLINE uint32_t ip_get_v4_as_int (ip_addr_t *addr)
 
INLINE char * ip_get_v4_as_bytes (const ip_addr_t *addr)
 
INLINE ip_addr_t ip_from_int (uint32_t i)
 
INLINE ip_addr_t ip_from_4_bytes_be (char b[4])
 
INLINE ip_addr_t ip_from_4_bytes_le (char b[4])
 
INLINE ip_addr_t ip_from_16_bytes_be (char b[16])
 
INLINE ip_addr_t ip_from_16_bytes_le (char b[16])
 
INLINE int ip_cmp (const ip_addr_t *addr1, const ip_addr_t *addr2)
 
INLINE int ip_is_null (const ip_addr_t *addr)
 
INLINE int ip_from_str (const char *str, ip_addr_t *addr)
 
INLINE void ip_to_str (const ip_addr_t *addr, char *str)
 

Detailed Description

Structure to store both IPv4 and IPv6 addresses and associated functions.

Author
Vaclav Bartos ibart.nosp@m.osv@.nosp@m.fit.v.nosp@m.utbr.nosp@m..cz
Date
2013
2014

Definition in file ipaddr.h.