FreeBSD kernel libkern code
inet_pton.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/systm.h>
#include <netinet/in.h>
Include dependency graph for inet_pton.c:

Go to the source code of this file.

Macros

#define strchr   index
 
#define NS_INADDRSZ   4
 
#define NS_IN6ADDRSZ   16
 
#define NS_INT16SZ   2
 

Functions

 __FBSDID ("$BSDSUniX$")
 
static int inet_pton4 (const char *src, u_char *dst)
 
static int inet_pton6 (const char *src, u_char *dst)
 
int inet_pton (int af, const char *src, void *dst)
 

Macro Definition Documentation

#define NS_IN6ADDRSZ   16

Referenced by inet_pton6().

#define NS_INADDRSZ   4

Referenced by inet_pton4(), and inet_pton6().

#define NS_INT16SZ   2

Referenced by inet_pton6().

#define strchr   index

Definition at line 31 of file inet_pton.c.

Referenced by inet_pton4(), and inet_pton6().

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
int inet_pton ( int  af,
const char *  src,
void *  dst 
)

Definition at line 54 of file inet_pton.c.

References inet_pton4(), and inet_pton6().

Here is the call graph for this function:

static int inet_pton4 ( const char *  src,
u_char *  dst 
)
static

Definition at line 78 of file inet_pton.c.

References NS_INADDRSZ, and strchr.

Referenced by inet_pton(), and inet_pton6().

Here is the caller graph for this function:

static int inet_pton6 ( const char *  src,
u_char *  dst 
)
static

Definition at line 132 of file inet_pton.c.

References inet_pton4(), memset(), NS_IN6ADDRSZ, NS_INADDRSZ, NS_INT16SZ, and strchr.

Referenced by inet_pton().

Here is the call graph for this function:

Here is the caller graph for this function: