Added inet_to_int function

master
Aadhavan Srinivasan 2 years ago
parent 2e5d2e64c0
commit 25bbcb620e

@ -2,7 +2,9 @@
#define EASYSOCK_H_ #define EASYSOCK_H_
#include <string.h> #include <string.h>
#include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -66,4 +68,8 @@ the given characters is neither of these) and return the appropriate SOCKTYPE va
int char_to_socktype(char transport); int char_to_socktype(char transport);
/* inet_to_int - Takes an int value that corresponds to AF_INET or AF_INET6,
and returns the appropriate int value. */
int inet_to_int(int af_type);
#endif #endif

Loading…
Cancel
Save