Score:0

Not seeing a packet sent from a client to the server in Wireshark

cn flag

I am new to socket programming and have a couple of questions.

For the context, I have a server and client with each having a socket opened: the socket on the server is bounded to INADDR_ANY which from my understanding listens to connection requests from any network interface, and the socket on the client-side is connected to a loopback interface for the time being.

  1. With this config, client is connecting to the server through the loopback interface or? I'm trying to visualize how the client server connection is established and how is the client interface used in establishing a connection.

  2. I was able to send a message from the client to the server however I don't see a packet in the wireshark. That shouldn't be the case, no?

Score:0
us flag
  1. Yes, client uses the localhost interface to send packets to the server, provided that they are running on the same machine.

  2. The packet should be visible when you monitor the localhost interface with Wireshark.

Jazzy avatar
cn flag
1. so basically any network interface could be used? also, what if the server is sitting elsewhere and the client wants to connect to it? 2. that's the thing though...I don't see any packet for 127.0.0.1
us flag
If server listens to any interface, it can be reached via any interface, that is, from any network that is routed properly to the server. Are you sure you have selected localhost interface in Wireshark?
Jazzy avatar
cn flag
True. was making sure because you mentioned as long as server and client are on the same machine. And are you referring to a filter? I tried both: no filter and did a ctrl-f for the 127.0.0.1 IP to no avail and with filter `ip.addr==127.0.0.1`
us flag
No, I am referring to the interface selection in Wireshark. It is not a filter.
djdomi avatar
za flag
Is that a answer or a comment?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.