I would like the program to listen a specified network (by assigning IP address), therefore I assign an IP address on the UDP socket. I have two network interfaces on my linux machine and two interfaces are connected to two different networks. I run the server code below to open a UDP socket.