Classes | Defines | Typedefs | Enumerations | Variables
address.h File Reference
#include <inttypes.h>
#include <sys/types.h>
#include <avahi-common/cdecl.h>
Include dependency graph for address.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AvahiAddress
struct  AvahiIPv4Address
struct  AvahiIPv6Address

Defines

#define AVAHI_ADDRESS_STR_MAX   40 /* IPv6 Max = 4*8 + 7 + 1 for NUL */
#define AVAHI_IF_VALID(ifindex)   (((ifindex) >= 0) || ((ifindex) == AVAHI_IF_UNSPEC))
#define AVAHI_PROTO_VALID(protocol)   (((protocol) == AVAHI_PROTO_INET) || ((protocol) == AVAHI_PROTO_INET6) || ((protocol) == AVAHI_PROTO_UNSPEC))

Typedefs

typedef struct AvahiAddress AvahiAddress
typedef int AvahiIfIndex
typedef struct AvahiIPv4Address AvahiIPv4Address
typedef struct AvahiIPv6Address AvahiIPv6Address

Enumerations

enum  { AVAHI_PROTO_INET = 0, AVAHI_PROTO_INET6 = 1, AVAHI_PROTO_UNSPEC = -1 }
enum  { AVAHI_IF_UNSPEC = -1 }

Functions

Comparison
int avahi_address_cmp (const AvahiAddress *a, const AvahiAddress *b)
String conversion
char * avahi_address_snprint (char *ret_s, size_t length, const AvahiAddress *a)
AvahiAddressavahi_address_parse (const char *s, AvahiProtocol af, AvahiAddress *ret_addr)
Protocol/address family handling
int avahi_proto_to_af (AvahiProtocol proto)
AvahiProtocol avahi_af_to_proto (int af)
const char * avahi_proto_to_string (AvahiProtocol proto)

Variables

AVAHI_C_DECL_BEGIN typedef int AvahiProtocol

Detailed Description

Definitions and functions to manipulate IP addresses.

Definition in file address.h.


Define Documentation

#define AVAHI_ADDRESS_STR_MAX   40 /* IPv6 Max = 4*8 + 7 + 1 for NUL */

Maximum size of an address in string form

Definition at line 53 of file address.h.

#define AVAHI_IF_VALID (   ifindex)    (((ifindex) >= 0) || ((ifindex) == AVAHI_IF_UNSPEC))

Return TRUE if the specified interface index is valid

Definition at line 56 of file address.h.

Return TRUE if the specified protocol is valid

Definition at line 59 of file address.h.


Typedef Documentation

typedef struct AvahiAddress AvahiAddress

Protocol (address family) independent address structure

typedef int AvahiIfIndex

Numeric network interface index. Takes OS dependent values and the special constant AVAHI_IF_UNSPEC

Definition at line 38 of file address.h.

An IPv4 address

An IPv6 address


Enumeration Type Documentation

anonymous enum

Values for AvahiProtocol

Enumerator:
AVAHI_PROTO_INET 

IPv4

AVAHI_PROTO_INET6 

IPv6

AVAHI_PROTO_UNSPEC 

Unspecified/all protocol(s)

Definition at line 41 of file address.h.

anonymous enum

Special values for AvahiIfIndex

Enumerator:
AVAHI_IF_UNSPEC 

Unspecified/all interface(s)

Definition at line 48 of file address.h.


Function Documentation

int avahi_address_cmp ( const AvahiAddress a,
const AvahiAddress b 
)

Compare two addresses. Returns 0 when equal, a negative value when a < b, a positive value when a > b.

AvahiAddress* avahi_address_parse ( const char *  s,
AvahiProtocol  af,
AvahiAddress ret_addr 
)

Convert the specified human readable character string to an address structure. Set af to AVAHI_UNSPEC for automatic address family detection.

char* avahi_address_snprint ( char *  ret_s,
size_t  length,
const AvahiAddress a 
)

Convert the specified address *a to a human readable character string, use AVAHI_ADDRESS_STR_MAX to allocate an array of the right size

Map Unix AF_xxx constants to AVAHI_PROTO_xxx constants

Map AVAHI_PROTO_xxx constants to Unix AF_xxx constants

const char* avahi_proto_to_string ( AvahiProtocol  proto)

Return a textual representation of the specified protocol number. i.e. "IPv4", "IPv6" or "UNSPEC"


Variable Documentation

Protocol family specification, takes the values AVAHI_PROTO_INET, AVAHI_PROTO_INET6, AVAHI_PROTO_UNSPEC

Definition at line 35 of file address.h.



pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:21