
libdnet学习笔记
文章平均质量分 70
progliker
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用dnet操作ethernet
<br />/* Output eth0 mac address */ #include <dnet.h> #include <stdio.h> #include <stdlib.h> #include <memory.h> int main() { eth_addr_t eddr; unsigned char c[6]; memset(&eddr, 0, sizeof(eddr)); eth_t *eth = eth_open("eth0");原创 2010-07-02 17:31:00 · 1533 阅读 · 0 评论 -
使用dnet操作interface
/* Dump system network interface */ #include #include #include #include static int intf_callback(const struct intf_entry *entry, void *arg) { int i; printf("interface: %s/n", entry->intf_name); printf("type = %d/n", entry->in原创 2010-07-02 18:52:00 · 1001 阅读 · 0 评论 -
初识libdnet
<br />第一次知道libdnet是在nmap中, 现在准备自己写一个扫描器, 也准备使用dnet来操作网卡接口和发送raw数据包。<br /> <br />libdnet下载: http://libdnet.sourceforge.net/<br /> <br />下载下来后直接<br />$ ./configure && make<br />$ sudo make install<br /> <br />为测试文件编写Makefile<br /> <br />SRC = $(wildcard原创 2010-07-02 15:52:00 · 4013 阅读 · 0 评论 -
使用dnet操作arp
<br />/* Dump kernel arp cache */ #include <dnet.h> #include <stdio.h> #include <stdlib.h> int arp_callback(const struct arp_entry *entry, void *args) { printf("arp protocol addr: %s/n", addr_ntoa(&entry->arp_pa)); printf("arp hardware addr原创 2010-07-02 16:34:00 · 663 阅读 · 0 评论