Click here to Skip to main content
16,021,226 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Manmohan2910-May-10 6:45
Manmohan2910-May-10 6:45 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Michel Godfroid10-May-10 6:54
Michel Godfroid10-May-10 6:54 
AnswerRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 6:48
professional Randor 10-May-10 6:48 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Michel Godfroid10-May-10 6:52
Michel Godfroid10-May-10 6:52 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 6:58
professional Randor 10-May-10 6:58 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Michel Godfroid10-May-10 7:03
Michel Godfroid10-May-10 7:03 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 7:08
professional Randor 10-May-10 7:08 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Michel Godfroid10-May-10 7:52
Michel Godfroid10-May-10 7:52 
This is really off-topic, but allow me this short explanation:
ARP is a layer 2 protocol (the MAC layer in Ethernet technologies). It establishes the relationship between layer 2 (Media Access Control) and layer 3 (the network layer in the OSI model, or the Internet Layer (typically IP)) The only way you will have an arp entry in your arp cache is as follows:
1) you issue a broadcast on your (IP) subnet, requesting the owner of a specific IP address to tell you it's mac address (or the mac address it can reach). The telecommunication equipment which may sit in between you and the destination will reply with either it's own mac address(if it knows it can switch your packets to the final destination), or with the real MAC address of the equipment, if it's a dumb component like a hub, or the final (directly connected) component in the chain.
2) the other component has queried you (probably through broadcast) for your address. In that case the Arp cache will associate the querying MAC address with the querying IP address.
The whole point of modern communication equipment, as opposed to old stuff (like hubs) is to limit the number of broadcasts and packet traffic on segments (segments, not subnets). Broadcasts are limited to a segment, and traffic is directed on the wire. With some modern intelligent switches, it is even possible to have duplicate MAC addresses on the network, as long they are not in the same segment. (I wouldn't recommend it though...)

So in the context of this discussion:
Walking the arp table, you'll miss all the hosts which are on a different subnet (you still need routers for making subnets), you may miss hosts which are on a different segment, and you'll miss hosts on your own segment if you haven't contacted them before their arp entry became stale. Otherwise, it's a fine technique.
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 8:19
professional Randor 10-May-10 8:19 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Michel Godfroid10-May-10 8:25
Michel Godfroid10-May-10 8:25 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 8:33
professional Randor 10-May-10 8:33 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Rajesh R Subramanian10-May-10 8:43
professionalRajesh R Subramanian10-May-10 8:43 
GeneralRe: How to find multiple servers on LAN using TCP socket [modified] Pin
Moak10-May-10 9:10
Moak10-May-10 9:10 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 9:22
professional Randor 10-May-10 9:22 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Moak10-May-10 9:31
Moak10-May-10 9:31 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 9:43
professional Randor 10-May-10 9:43 
GeneralRe: How to find multiple servers on LAN using TCP socket [modified] Pin
Moak10-May-10 10:25
Moak10-May-10 10:25 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Rajesh R Subramanian10-May-10 9:28
professionalRajesh R Subramanian10-May-10 9:28 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Rajesh R Subramanian10-May-10 9:40
professionalRajesh R Subramanian10-May-10 9:40 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Rajesh R Subramanian10-May-10 21:50
professionalRajesh R Subramanian10-May-10 21:50 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 9:11
professional Randor 10-May-10 9:11 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Rajesh R Subramanian10-May-10 9:24
professionalRajesh R Subramanian10-May-10 9:24 
GeneralRe: How to find multiple servers on LAN using TCP socket [modified] Pin
Michel Godfroid10-May-10 9:04
Michel Godfroid10-May-10 9:04 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Randor 10-May-10 9:29
professional Randor 10-May-10 9:29 
GeneralRe: How to find multiple servers on LAN using TCP socket Pin
Michel Godfroid10-May-10 9:44
Michel Godfroid10-May-10 9:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.