Question: We write the following program to send a packet. data = bHello, Server udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) udp.sendto(data, (10.9.0.5, 9090)) (1) How is the source

We write the following program to send a packet.

data = b"Hello, Server"

udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

udp.sendto(data, ("10.9.0.5", 9090))


(1) How is the source port number of the packet decided?

(2) How is the source IP of the packet decided?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

When you send data over a network using sockets especially in the context of the User Datagram Protocol UDP there are certain details regarding how th... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!