encapsulated several fillings of n2n_sock_t in single function (#1025)

* encapsulated several fillings of n2n_sock_t in single function

* Windows specifics...

* stuck to the project's style code
This commit is contained in:
Logan oos Even
2022-06-26 00:07:29 +02:00
committed by GitHub
parent 063db27ea6
commit ffb4e31b8a
5 changed files with 53 additions and 27 deletions
+2
View File
@@ -240,6 +240,8 @@ typedef struct tuntap_dev {
} tuntap_dev;
#define SOCKET int
#else /* #ifndef WIN32 */
typedef u_short sa_family_t;
#endif /* #ifndef WIN32 */
+3
View File
@@ -190,6 +190,9 @@ int fill_sockaddr (struct sockaddr * addr,
size_t addrlen,
const n2n_sock_t * sock);
int fill_n2nsock (n2n_sock_t* sock,
struct sockaddr* sa);
int encode_PACKET (uint8_t * base,
size_t * idx,
const n2n_common_t * common,