arp таблица

Discussion in 'С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby' started by ntldr, 24 Mar 2010.

  1. ntldr

    ntldr Elder - Старейшина

    Joined:
    4 Dec 2007
    Messages:
    367
    Likes Received:
    140
    Reputations:
    23
    Задача - получить таблицу маршрутизации, желательно методом, равным и для ХР и для виста+
     
  2. Kaimi

    Kaimi Well-Known Member

    Joined:
    23 Aug 2007
    Messages:
    1,732
    Likes Received:
    809
    Reputations:
    231
    Вызвать arp -a не вариант?
    Тут пример есть http://codeguru.earthweb.com/cpp/i-n/network/networkinformation/print.php/c14635
     
    _________________________
    1 person likes this.
  3. ntldr

    ntldr Elder - Старейшина

    Joined:
    4 Dec 2007
    Messages:
    367
    Likes Received:
    140
    Reputations:
    23
    этот пример я видел, он вроде как только под ХР. И как то кода многовато, проще точно никак?
     
  4. sn0w

    sn0w Статус пользователя:

    Joined:
    26 Jul 2005
    Messages:
    1,021
    Likes Received:
    1,200
    Reputations:
    327
    пацаны, читаем мсдн...

    в ремарках про SendARP

    ...
    On Windows Vista, a new family of functions can be used to access, modify, and delete the ARP table entries when the Address member of the MIB_IPNET_ROW2 structure passed to these functions is an IPv4 address. The new functions include the following: GetIpNetTable2, CreateIpNetEntry2, DeleteIpNetEntry2, FlushIpNetTable2, and SetIpNetEntry2.
    ...
     
    3 people like this.