| 1 | ArpRequest |
| 2 | ========== |
| 3 | |
| 4 | General |
| 5 | ------- |
| 6 | |
| 7 | ArpRequest is a Python module designed to make an ARP gratuitous request |
| 8 | to know if a host is online. It acts on OSI model's level 2 unlike |
| 9 | icmp echo (ping), so, you can use it without IP configuration, or to |
| 10 | "ping" an host in other IP network. However, you can only use it on |
| 11 | local networks. |
| 12 | |
| 13 | Usage |
| 14 | ----- |
| 15 | |
| 16 | >>> from arprequest import ArpRequest |
| 17 | >>> ar = ArpRequest('10.0.0.1', 'eth0') |
| 18 | >>> ar.request() |
| 19 | True |
| 20 | >>> ar2 = ArpRequest('10.0.0.123', 'eth0') # 10.0.0.123 doesen't exist |
| 21 | >>> ar2.request() |
| 22 | False |
| 23 | |
| 24 | Changelog |
| 25 | --------- |
| 26 | |
| 27 | 0.3 : |
| 28 | |
| 29 | - You can now select type of ARP request. This is done with "arp_type" |
| 30 | argument of ArpRequest class. You can use arprequest.ARP_GRATUITOUS |
| 31 | to make an ARP Gratuitous request (what is currently done) or use |
| 32 | arprequest.ARP_STANDARD to do a standard ARP request. |
| 33 | |
| 34 | This option was created to use this library with systems which are |
| 35 | configured to block Arp Gratuitous. |
| 36 | |
| 37 | Constraints |
| 38 | ----------- |
| 39 | |
| 40 | - ArpRequest work only on unix or unix-like platforms because it uses |
| 41 | unix signals. |
| 42 | - ArpRequest work only as root, because it uses raw sockets. |
| 43 | - Module is commented in french. I will translate comments in english, |
| 44 | some day... |
| 45 | |
| 46 | |