Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

sockaddr_atop.c File Reference


Detailed Description

For internal use only.

This file contains the implementation of the sockaddr_atop() function.

Definition in file sockaddr_atop.c.

#include "event_int.h"
#include <stdio.h>
#include <string.h>

Include dependency graph for sockaddr_atop.c:

Go to the source code of this file.

Functions

static ev_err_t atop_v4 (const ev_sockaddr_t *sa, const unsigned char *addr, char *buf, ev_flags_t flags)
 Build presentation format for an IPv4 address.
static ev_err_t atop_v6 (const ev_sockaddr_t *sa, const unsigned char *addr, char *buf, ev_flags_t flags)
 Build presentation format for an IPv6 address.
ev_err_t sockaddr_atop (const ev_sockaddr_t *sa, char *buf, int size, ev_flags_t flags)
 Build presentation format of an ev_sockaddr_t.


Function Documentation

static ev_err_t atop_v4 const ev_sockaddr_t sa,
const unsigned char *  addr,
char *  buf,
ev_flags_t  flags
[static]
 

This helper function formats an IPv4 address in its presentation format, optionally including the port number.

Parameters:
[in] sa A pointer to the ev_sockaddr_t being formatted.
[in] addr A pointer to the binary representation of the address.
[in] buf A pointer to the buffer to receive the presentation format.
[in] flags Flags to indicate which components of the address to omit; pass 0 to include all components of the address. To omit the port, use the SOCKADDR_ATOP_NOPORT flag.
Returns:
This function always returns 0.

Definition at line 54 of file sockaddr_atop.c.

References ev_return, ev_trace, sa_ipaddrport, and SOCKADDR_ATOP_NOPORT.

Referenced by atop_v6(), and sockaddr_atop().

static ev_err_t atop_v6 const ev_sockaddr_t sa,
const unsigned char *  addr,
char *  buf,
ev_flags_t  flags
[static]
 

This helper function formats an IPv6 address in its presentation format, optionally including the port number.

Parameters:
[in] sa A pointer to the ev_sockaddr_t being formatted.
[in] addr A pointer to the binary representation of the address.
[in] buf A pointer to the buffer to receive the presentation format.
[in] flags Flags to indicate which components of the address to omit; pass 0 to include all components of the address. To omit the port, use the SOCKADDR_ATOP_NOPORT flag.
Returns:
This function always returns 0.

Definition at line 87 of file sockaddr_atop.c.

References atop_v4(), ev_return, ev_trace, sa_ipaddrport, SOCK_ADDRBUFV4_LEN, SOCK_ADDRBUFV6_LEN, and SOCKADDR_ATOP_NOPORT.

Referenced by sockaddr_atop().

Here is the call graph for this function:


Generated on Wed Dec 28 23:37:30 2005 for event by  doxygen 1.4.4