Which adapter did I just receive this UDP packet?

I am trying to write a BOOTP server in C #.

I receive and parse the BOOTP packet from the client, and I need to respond to my server IP address.

The problem is this:

  • A computer may have several network adapters
  • The client does not yet have an IP address

Is there any way to find out which adapter received the UDP packet?

+3
source share
1 answer

. IP- , , . IP_RECVIF recvmsg, , Windows. 22.2 22.6 Unix. SIOCGIFCONF ioctl, . 17.6 UNP . # , Windows, C, /IP, mmap # .

+2

Source: https://habr.com/ru/post/1732884/


All Articles