qlibs:

Section: Misc. Reference Manual Pages (ipv6)
Index Return to Main Contents
 

NAME

ipv6 - IPv6 address evaluation and conversion  

SYNOPSIS

#include "ip.h"

unsigned int ip6_fmt(char *s,char ip[16]);
unsigned int ip6_fmt_flat(char *s,char ip[16]);
unsigned int ip6_scan_flat(const char *s,char ip[16]);
unsigned int ip6_scan(const char *s,char ip[16]);
unsigned int ip6_scanbracket(const char *s,char ip[16]);
unsigned int ip6_ifscan(char *s,char ip[16],stralloc *ifname);
unsigned int ip6_cidr(char *s,char ip[16],unsigned long *plen);
unsigned int ip6_bytestring(stralloc *ip6string,char ip[16],int plen);  

DESCRIPTION

ip6_fmt reads the char[16] IPv6 address and returns a compactified hexadecimal IPv6 address string fe80::fefe.

ip6_fmt_flat reads the char[16] IPv6 address and returns all hexadecimal IPv6 address labels as string fe80:0000:....:fefe.

ip6_scan reads a compactified IPv6 address string fe80::fefe and converts it to the char[16] IPv6 address.

ip6_scan_flat reads an uncompressed IPv6 address als hexadecimal string and returns it's char[16] IPv6 address.

ip6_scanbracket reads a compactified IPv6 address string enclosed in brackets [fe80::fefe] removes the brackets and calls ip6_scan on the result.

ip6_ifscan reads the compactified IPv6 address string appended with the interface_name fe80::fefe%eth0 returns ifname and calls ip6_scan for the (stripped) IPv6 address.

ip6_cidr reads the compactified CIDR IPv6 address string fe80::fefe/64 determines the prefix as integer plen and calls ip6_scan. If no prefix is identfied, it returns 128.

ip6_bytestring reads the IPv6 address given as char[16] while returning a 0-terminated 'bytestring' representation 1001001.... up to the given prefix length plen.

The macro ipv6_v4mapped reads the IPv6 addresses given as char[16] and returns 0 in case the given IPv6 address is not a IPv4 mapped address.  

RETURN CODES

The ip(6)* programs return the number of bytes processed. ip6_bytestring returns negative numbers on failure.  

SEE ALSO

ip4(3), socket_if(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN CODES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 14:55:39 GMT, December 15, 2024