#include "byte.h"
#include "stralloc.h"
Go to the source code of this file.
◆ IP6_FMT
Definition at line 22 of file ip6.h.
◆ ip6_isv4mapped
Definition at line 28 of file ip6.h.
◆ V4MAPPREFIX
#define V4MAPPREFIX "::ffff:" |
Definition at line 30 of file ip6.h.
◆ bitstringtoip6()
int bitstringtoip6 |
( |
stralloc * |
ip6string, |
|
|
stralloc * |
ip6addr |
|
) |
| |
This function converts a bit string which is produced by ip6tobitstring() into an IPv6 address. The string may start with a '^'.
- Parameters
-
ip6string | Source string which need to be converted. |
ip6addr | Destination string. |
- Returns
- -1: No memory could allocated,0: Failure,1: Success.
Definition at line 76 of file ip6_bit.c.
◆ ip6_compactaddr()
unsigned int ip6_compactaddr |
( |
char * |
s, |
|
|
char |
ip[16] |
|
) |
| |
This function converts a IPv6 address as 16 bytes char array into a compactified string.
- Author
- Felix von Leitner
- Parameters
-
s | Destination address. |
ip | Source address as 16 bytes char array. |
- Returns
- 0: failure, else: the number of characters of the return value.
Definition at line 15 of file ip6_compactaddr.c.
◆ ip6_expandaddr()
unsigned int ip6_expandaddr |
( |
char * |
src, |
|
|
stralloc * |
destination |
|
) |
| |
This function expands any valid IPv6 address into its full format of 16 bytes. It returns the number of processed tokens on success.
- Parameters
-
src | Source IPv6 address. |
destination | Expanded IPv6 address. |
- Returns
- -1: No memory could allocated, 0:failure, 1: success
Definition at line 15 of file ip6_expandaddr.c.
◆ ip6_scan()
unsigned int ip6_scan |
( |
const char * |
src, |
|
|
char * |
ip |
|
) |
| |
◆ ip6tobitstring()
int ip6tobitstring |
( |
char * |
ip6address, |
|
|
stralloc * |
ip6string, |
|
|
unsigned int |
prefix |
|
) |
| |
This function converts a IPv6 address into its binary representation.
- Parameters
-
ip6address | The source address. |
ip6string | The destination address. |
prefix | The net prefix bits (maximum 128 bits for IPv6). |
- Returns
- -1:lack of memory,0: non valid IPv6 address,1: successful converted.
Definition at line 20 of file ip6_bit.c.
◆ V4mappedprefix
const unsigned char V4mappedprefix[12] |
◆ V6any
const unsigned char V6any[16] |
◆ V6loopback
const unsigned char V6loopback[16] |