From ddb1b16c93ad9edd5846ea7dafeb9635af1b6083 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Wed, 8 Mar 2023 15:45:47 -0600 Subject: [PATCH] Added inet_to_int function --- easysock.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/easysock.h b/easysock.h index a70b21f..f274174 100644 --- a/easysock.h +++ b/easysock.h @@ -2,7 +2,9 @@ #define EASYSOCK_H_ #include +#include #include +#include #include #include #include @@ -66,4 +68,8 @@ the given characters is neither of these) and return the appropriate SOCKTYPE va 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