Network Data Structures & Functions
http response codes
http header
http payload
Network Data Structures
// in ipV4
struct hostent {
char* h_name;
char** h_aliases;
int h_addrtype;
int h_length;
char** h_addr_list;
};
struct in_addr {
int s_addr;
};
Network Functions
struct hostent* getHostByName(const char* name);
struct hostent* getHostByAddr(const char* addr, int type, int length);
Abstractions with increasing modularity
- function call – no modularity with caller/callee stack discipline
- system call – enforced modularity – caller can’t access to the ghost of the stack space for system calls
- pipe
- network
Sorry, the comment form is closed at this time.