i was trying to madify th eth.c file(linux/net/ethernet/eth.c ) to print ethernet header here is my diff code:
-- eth_prev.c 2001-03-03 00:32:15.000000000 +0530
+++ eth.c 2006-04-17 14:31:39.000000000 +0530
@@ -60,7 +60,7 @@
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/checksum.h>
-
+#define ethheader
extern int __init netdev_boot_setup(char *str);
__setup("ether=", netdev_boot_setup);
@@ -112,6 +112,12 @@ int eth_header(struct sk_buff *skb, stru
return dev->hard_header_len;
}
+ #ifdef ethheader
+ printk("\n\n\n************ETHERNET ADDRESS****************");
+ printk("\nh_dest:%u.%u.%u.%u",NIPQUAD(skb->mac.ethernet->h_dest));
+printk("\nh_source:%u.%u.%u.%u",NIPQUAD(skb->mac.ethernet->h_source));
+ printk("\nh_proto:%d",skb->mac.ethernet->h_proto);
+#endif
return -dev->hard_header_len;
}
|