fmt_ip6c(3) [debian man page]
fmt_ip6c(3) Library Functions Manual fmt_ip6c(3) NAME
fmt_ip6c - write a formatted ASCII representation of an IPv6 number SYNTAX
#include <ip6.h> unsigned int fmt_ip6c(char *dest,const char ip[16]); DESCRIPTION
fmt_ip6c formats an IPv6 number in ASCII representation from ip and writes the result into dest. It returns the number of bytes written. fmt_ip6c will apply "::" compression to the output. If ip is an IPv4-mapped IPv6 address, fmt_ip6c will output it as IPv4 address. If dest equals FMT_LEN (i.e. is zero), fmt_ip6c returns the number of bytes it would have written. fmt_ip6c does not append . For convenience, ip6.h defines the integer IP6_FMT to be big enough to contain every possible fmt_ip6c output plus . EXAMPLE
#include <ip6.h> char buf[IP6_FMT]; char ip[16]; buf[fmt_ip6c(buf,ip)]=0; SEE ALSO
fmt_ip6(3), fmt_ip6ifc(3), scan_ip6(3), fmt_ip4(3) fmt_ip6c(3)
Check Out this Related Man Page
VSNPRINTF(9) Basic C Library Functions VSNPRINTF(9) NAME
vsnprintf - Format a string and place it in a buffer SYNOPSIS
int vsnprintf(char * buf, size_t size, const char * fmt, va_list args); ARGUMENTS
buf The buffer to place the result into size The size of the buffer, including the trailing null space fmt The format string to use args Arguments for the format string DESCRIPTION
This function follows C99 vsnprintf, but has some extensions: pS output the name of a text symbol with offset ps output the name of a text symbol without offset pF output the name of a function pointer with its offset pf output the name of a function pointer without its offset pB output the name of a backtrace symbol with its offset pR output the address range in a struct resource with decoded flags pr output the address range in a struct resource with raw flags pM output a 6-byte MAC address with colons pMR output a 6-byte MAC address with colons in reversed order pMF output a 6-byte MAC address with dashes pm output a 6-byte MAC address without colons pmR output a 6-byte MAC address without colons in reversed order pI4 print an IPv4 address without leading zeros pi4 print an IPv4 address with leading zeros pI6 print an IPv6 address with colons pi6 print an IPv6 address without colons pI6c print an IPv6 address as specified by RFC 5952 pIS depending on sa_family of 'struct sockaddr *' print IPv4/IPv6 address piS depending on sa_family of 'struct sockaddr *' print IPv4/IPv6 address pU[bBlL] print a UUID/GUID in big or little endian using lower or upper case. %*ph[CDN] a variable-length hex string with a separator (supports up to 64 bytes of the input) pc print a cpumask as comma-separated list n is ignored ** Please update Documentation/printk-formats.txt when making changes ** The return value is the number of characters which would be generated for the given input, excluding the trailing '