FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEaddr.cpp File Reference
#include <stdio.h>
#include <OMEdebugInfo.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/un.h>
#include <unistd.h>
#include <netdb.h>
#include <errno.h>
#include <sys/uio.h>

Macros

#define OME_SUPPORT_FOR_AF_UNIX   /* All Unix platforms support AF_UNIX */
 
#define OUR_sockaddr_in6   struct sockaddr_in6
 

Functions

uint32_t if_nametoindex (const char *ifname)
 
char * if_indextoname (uint32_t ifindex, char *ifname)
 
OMEstringOMEdisplayableAddress (const struct sockaddr *sock, const int len, const uint32_t openMode)
 Convert sockaddr data into a text string. More...
 
int OMEtransportToSockaddr (sockBigEnough *sock, uint_fast16_t *sockLen, int *sockMode, const char *url, uint_fast16_t urlLen)
 Convert textual transport address into sockaddr structure. More...
 

Macro Definition Documentation

◆ OME_SUPPORT_FOR_AF_UNIX

#define OME_SUPPORT_FOR_AF_UNIX   /* All Unix platforms support AF_UNIX */

◆ OUR_sockaddr_in6

#define OUR_sockaddr_in6   struct sockaddr_in6

Function Documentation

◆ if_indextoname()

char* if_indextoname ( uint32_t  ifindex,
char *  ifname 
)

Referenced by OMEdisplayableAddress().

◆ if_nametoindex()

uint32_t if_nametoindex ( const char *  ifname)

Referenced by OMEtransportToSockaddr().

◆ OMEtransportToSockaddr()

int OMEtransportToSockaddr ( sockBigEnough *  sock,
uint_fast16_t *  sockLen,
int *  sockMode,
const char *  url,
uint_fast16_t  urlLen 
)

Convert textual transport address into sockaddr structure.

Parameters
sockpoints at a sockaddr structure that is large enough to hold the transport data.
sockLenpoints to an integer indicating the size of the sock structure. Upon entry it should indicate the total amount of space available; upon exit it is adjusted to indicate the actual size used.
sockModeis a pointer to an integer that will be filled in with additional data describing the type of the connection. A null pointer may be specified if this information is not desired.
urlpoints to the text string describing the transport address.
urlLenindicates the length of the text.
Return values
0indicates an unsupported type.
1indicates a successful conversion was performed.
See also
OMEdisplayableAddress()

References AND_OUTPUT_NLM, DEFINE_NLM_MESSAGE, htons, if_nametoindex(), NEXT_NLM_PARAM, NOTE_DEFAULT_NLM, OME_IO_CONNECT, OME_IO_DATAGRAM, OME_IO_LISTEN, OME_IO_NONBLOCKING, OME_IO_RAW, OMEdebugBadParameter, OUR_sockaddr_in6, and sock.

Referenced by lookupAddress(), and OMEsocketDescriptor::openSocketScheme().

Generated: Fri Jul 31 2020 18:19:15
Support Information