0 2 min 7 dys

  Insert image description here

  Note:website online casino online website and What is it

  1. sock_raw_fd: Raw socket

  2. msg: The message to be sent (encapsulated digital protocol)

  3. sll: Local network interface, the value of the data to be sent should come from which network card on this machine, rather than the previous destination address

  Raw socket: Frame data packets -> Set which network card on this machine to send sendto

  ① Local interface structure

  Header file:

  Structure to store address:

  Insert image description here

  It is only necessary to assign the value to sll.sll_ifindex.

  ② Obtain local interface and send

  Obtain network interface address through ioctl

  Header file:

  Header file for struct ifreq:

  Function:

  fd: Raw socket

  request: Request

  void *: Stores an address structure

  ioctl interface example:

  ioctl parameter comparison table:

  Insert image description here

  Overview: Scanning MAC address

  1. Overview of ARPonline casino localClick to enter

  ① It is one of the TCP/IP protocol suite

  ② It is mainly used to query the MAC address corresponding to the IP

  ③ The requesting party uses broadcast to send requests

  ④ The responding party uses unicast to return data

  ⑤ To improve efficiency when sending data, an ARP cache table is used in the calculation to temporarily store the MAC address corresponding to the IP. In LINUX, ARP can be used to view it, and in XP, ARP -a is used

  Insert image description here