180 likes | 311 Views
KERNEL HACKING Data Transport in Wireless Ad Hoc Networks Implementation of a New Wireless Ad Hoc Networking Protocol In Linux Kernel. ULA Ş ÜNLÜ. Overview. Wireless Ad Hoc Networks Linux Kernel Networking Network Devices Packet transmission and receiving - Testbed. Goal.
E N D
KERNEL HACKING Data Transport in Wireless Ad Hoc Networks Implementation of a New Wireless Ad Hoc Networking Protocol In Linux Kernel ULAŞ ÜNLÜ
Overview • Wireless Ad Hoc Networks • Linux Kernel Networking • Network Devices • Packet transmission and receiving • - Testbed Data Transport in Wireless Ad Hoc Networks
Goal • Send and receive ethernet frames in • wireless environment - Use wireless ethernet interfaces • The basis of wireless ad hoc networks Data Transport in Wireless Ad Hoc Networks
Send then catch and pass to the • protocol layer • New protocol added into the kernel • - Must know kernel data structures Data Transport in Wireless Ad Hoc Networks
Wireless Ad Hoc Networks - Uses 802.11 FC ID Addr1 Addr2 Addr3 Seq Addr4 data CRC IP header TCP header user data Data Transport in Wireless Ad Hoc Networks
- Normal ethernet frame format preamble source mac dest mac proto data CRC IP header TCP header user data Data Transport in Wireless Ad Hoc Networks
- Infrastructured Data Transport in Wireless Ad Hoc Networks
- Ad Hoc Data Transport in Wireless Ad Hoc Networks
Linux kernel protocol support • Various protocols • IP - IPX - X25 - AX25 • ECONET-DECNET • BSD Socket Interface • Network devices Data Transport in Wireless Ad Hoc Networks
Layered Implementation User processes user kernel BSD Sockets protocol layer INET Sockets Protocol Multiplexing hardware Network Devices Data Transport in Wireless Ad Hoc Networks
Linux kernel networking initialization • Boot time system setup functions Memory management File systems etc. • Initialize the networking subsystem sock_init() • init functions for protocols Data Transport in Wireless Ad Hoc Networks
protocols list inet, inet_proto_init x25, x25_proto_init ax25, ax25_proto_init … econet, econet_proto_init netlink, netlink_proto_init • init functions register protocols • unique protocol number • add protocol number and receive routine Data Transport in Wireless Ad Hoc Networks
sk_buff structure struct sk_buff data • Keeps user data • More fields for IP protocol Data Transport in Wireless Ad Hoc Networks
net_device struct • Unique name • eth0 eth1 eth2 etc… sk_buffs sk_buffs sk_buffs eth0 eth1 eth2 net_device net_device net_device Data Transport in Wireless Ad Hoc Networks
Packet Transmission • Allocate an sk_buff • Put data • Put protocol type • Get the net_device for ethn • Put MACs • Transmit sk_buff protocol MACs data Data Transport in Wireless Ad Hoc Networks
Packet Receiving Protocol receive functions x25_rcv() ip_rcv() ax25_rcv() .... .... Protocol Multiplexing (Bottom half handling) Network Devices Data Transport in Wireless Ad Hoc Networks
Network Interface Drivers - eth frame -> driver -> kernel data structure driver ethernet frame sk_buff driver ethernet frame sk_buff Data Transport in Wireless Ad Hoc Networks
Implementation & Testing Data Transport in Wireless Ad Hoc Networks