Instrument Neutral Distributed Interface INDI  2.0.2
Macros | Functions
utils.cpp File Reference
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netdb.h>
#include <netinet/in.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <system_error>
#include "utils.h"

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 

Functions

void setupSigPipe ()
 
int unixSocketListen (const std::string &unixAddr)
 
int tcpSocketListen (int port)
 
int socketAccept (int fd)
 
int unixSocketConnect (const std::string &unixAddr, bool failAllowed)
 
void unixSocketSendFds (int fd, int count, int *fds)
 
void unixSocketRecvFds (int fd, int count, int *fdsDest)
 
int tcpSocketConnect (const std::string &host, int port, bool failAllowed)
 
std::string getTestExePath (const std::string &str)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 20 of file utils.cpp.

Function Documentation

◆ getTestExePath()

std::string getTestExePath ( const std::string &  str)

Definition at line 340 of file utils.cpp.

◆ setupSigPipe()

void setupSigPipe ( )

Definition at line 37 of file utils.cpp.

◆ socketAccept()

int socketAccept ( int  fd)

Definition at line 144 of file utils.cpp.

◆ tcpSocketConnect()

int tcpSocketConnect ( const std::string &  host,
int  port,
bool  failAllowed 
)

Definition at line 301 of file utils.cpp.

◆ tcpSocketListen()

int tcpSocketListen ( int  port)

Definition at line 108 of file utils.cpp.

◆ unixSocketConnect()

int unixSocketConnect ( const std::string &  unixAddr,
bool  failAllowed 
)

Definition at line 155 of file utils.cpp.

◆ unixSocketListen()

int unixSocketListen ( const std::string &  unixAddr)

Definition at line 71 of file utils.cpp.

◆ unixSocketRecvFds()

void unixSocketRecvFds ( int  fd,
int  count,
int *  fdsDest 
)

Definition at line 228 of file utils.cpp.

◆ unixSocketSendFds()

void unixSocketSendFds ( int  fd,
int  count,
int *  fds 
)

Definition at line 183 of file utils.cpp.