1 #include "../src/utils.h"
3 int main(int argc, char *argv[])
5 struct nl_sock *h[1025];
8 h[0] = nl_handle_alloc();
9 printf("Created handle with port 0x%x\n",
10 nl_socket_get_local_port(h[0]));
11 nl_handle_destroy(h[0]);
12 h[0] = nl_handle_alloc();
13 printf("Created handle with port 0x%x\n",
14 nl_socket_get_local_port(h[0]));
15 nl_handle_destroy(h[0]);
17 for (i = 0; i < 1025; i++) {
18 h[i] = nl_handle_alloc();
20 nl_perror("Unable to allocate socket");
22 printf("Created handle with port 0x%x\n",
23 nl_socket_get_local_port(h[i]));