Skip to content

Tag: network-programming

Understanding getaddrinfo function in C

I’m new to C and socket programming, just a question on getaddrinfo function. The function prototype of getaddrinfo is: and getaddrinfo returns a result that points to a linked list of addrinfo structures, each of which points to a socket address structure that corresponds to host and service. Below is …

Identify virtual network interface in c

I am trying to find which interface my device is running on with C. I scanned all interfaces with ioctl, I arranged the result as : I used getifaddrs() to get list of interfces, then ioctl (IP using SIOCGIFADDR), (flags using SIOCGIFFLAGS) enum net_device_flags, and (mac using SIOCGIFHWADDR). From the list, I…

TCP_FASTOPEN cookie is saved per what?

I’ve been reading about TCP_FASTOPEN in Linux and I can’t figure out per what is cookie saved. If one program on my Linux server connects using tcp fast open, does other program that connects to same server uses previous ones cookie for fast open? Or only sockets from same program can use each oth…