File Reference
#include "squid.h"
#include "convert.hh"
#include <cstdlib>
#include <cstring>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
Include dependency graph for

Go to the source code of this file.


#define SA   struct sockaddr


const char * my_inet_ntoa (const struct in_addr &a, HostAddress output)
const char * my_sock_ntoa (const struct sockaddr_in &a, SockAddress buffer)
const char * my_sock_fd2a (int fd, SockAddress buffer, bool peer)
int convertHostname (const char *host, in_addr &dst)
int convertPortname (const char *port, unsigned short &dst)

Macro Definition Documentation

◆ SA

#define SA   struct sockaddr

Definition at line 59 of file

Referenced by my_sock_fd2a(), and serverSocket().

Function Documentation

◆ convertHostname()

int convertHostname ( const char *  host,
in_addr &  dst 

Definition at line 119 of file

References gethostbyname(), hostent::h_length, and NULL.

Referenced by main(), and parseCommandline().

◆ convertPortname()

int convertPortname ( const char *  port,
unsigned short &  dst 

Definition at line 140 of file

References getservbyname(), NULL, p, and servent::s_port.

Referenced by parseCommandline().

◆ my_inet_ntoa()

const char* my_inet_ntoa ( const struct in_addr &  a,
HostAddress  output 

Definition at line 63 of file

Referenced by my_sock_ntoa().

◆ my_sock_fd2a()

const char* my_sock_fd2a ( int  fd,
SockAddress  buffer,
bool  peer 

Definition at line 98 of file

References len, my_sock_ntoa(), NULL, and SA.

◆ my_sock_ntoa()

const char* my_sock_ntoa ( const struct sockaddr_in &  a,
SockAddress  buffer 

Definition at line 85 of file

References my_inet_ntoa().

Referenced by my_sock_fd2a(), and serverSocket().






Web Site Translations