Haka
Macros | Typedefs | Functions
ipv4-addr.h File Reference
#include <haka/types.h>
#include <stddef.h>

Go to the source code of this file.

Macros

#define IPV4_ADDR_STRING_MAXLEN   15
 

Typedefs

typedef uint32 ipv4addr
 

Functions

void ipv4_addr_to_string (ipv4addr addr, char *string, size_t size)
 
ipv4addr ipv4_addr_from_string (const char *string)
 
ipv4addr ipv4_addr_from_bytes (uint8 a, uint8 b, uint8 c, uint8 d)
 

Detailed Description

IPv4 address API.

Macro Definition Documentation

#define IPV4_ADDR_STRING_MAXLEN   15

String max size for converting ipv4addr to string.

Typedef Documentation

typedef uint32 ipv4addr

IPv4 address type.

Function Documentation

ipv4addr ipv4_addr_from_bytes ( uint8  a,
uint8  b,
uint8  c,
uint8  d 
)

Convert IP from bytes to ipv4addr.

ipv4addr ipv4_addr_from_string ( const char *  string)

Convert IP from string to ipv4addr structure.

void ipv4_addr_to_string ( ipv4addr  addr,
char *  string,
size_t  size 
)

Convert IP from ipv4addr to string.