Sponge
CS144's user-space TCP library
Classes | Functions
address.cc File Reference
#include "address.hh"
#include "util.hh"
#include <arpa/inet.h>
#include <cstring>
#include <memory>
#include <netdb.h>
#include <stdexcept>
#include <system_error>
Include dependency graph for address.cc:

Go to the source code of this file.

Classes

class  gai_error_category
 Error category for getaddrinfo and getnameinfo failures. More...
 

Functions

static addrinfo make_hints (const int ai_flags, const int ai_family)
 Build a struct addrinfo containing hints for getaddrinfo(3). More...
 

Function Documentation

◆ make_hints()

static addrinfo make_hints ( const int  ai_flags,
const int  ai_family 
)
inlinestatic

Build a struct addrinfo containing hints for getaddrinfo(3).

Parameters
[in]ai_flagsis the value of the ai_flags field in the struct addrinfo
[in]ai_familyis the value of the ai_family field in the struct addrinfo

Definition at line 71 of file address.cc.