Thread: Detect which Network Interface a message was received from!?!

  1. #1
    Purvi
    Guest

    Unhappy Detect which Network Interface a message was received from!?!

    Hi Guys,

    I need your help!! I have a server application that receives broadcasts on differnt network cards by using the following command:

    servAddr.sin_addr.s_addr = htonl(INADDR_BROADCAST);

    However, once i receive a message, i need to know which NIC port it came from. Can you guys tell me what command I can use in order to retrieve this information?

    Thanks and Regards,
    Purvi

  2. #2
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    I know this question is old but...at least in Linux we bind to a specific NIC/port when listening and so when (say) eth0 gets a packet it is kinda obvious. No idea on Windows but this is how it is on Linux.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Don't bump eight year old threads.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem with UDP WSAAsyncSelect socket, no callback message received???
    By hanhao in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-29-2004, 11:59 AM
  2. Finding users on a network and messaging them.
    By Necrodeemer in forum C++ Programming
    Replies: 3
    Last Post: 05-04-2003, 02:04 PM
  3. network problems
    By lucy in forum Tech Board
    Replies: 6
    Last Post: 01-01-2003, 03:33 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM