This is a low-level network debugging utility that utilizes raw packet i/o to construct and deconstruct tcp, udp, ipv4, arp, and icmp packets over ethernet.
net.h File Reference
This file encompasses all of the networking headers and includes them automatically. More...
Go to the source code of this file.
Functions | |
u16 | checksum (void *_mem, unsigned int bytes, void *skip_byte=NULL, unsigned int skip_count=0, u16 last=0) |
General networking checksum - Used for IP, TCP, UDP, ICMP, etc. | |
void | fix_endian_u16 (u16 *p) |
Generic u16 endian swapping. | |
void | fix_endian_u32 (u32 *p) |
Generic u32 endian swapping. | |
void | hex_dump (void *base, unsigned int length) |
Hex dump a word-aligned number of bytes (will print extra bytes if length is not a multiple of 32 bits) |
Detailed Description
This file encompasses all of the networking headers and includes them automatically.
This file has some utility functions and definitions used by all of the networking headers, and includes them all. This is the only file necessary to include to use all of the networking facilities in nettool
Definition in file net.h.
Function Documentation
u16 checksum | ( | void * | _mem, |
unsigned int | bytes, | ||
void * | skip_byte = NULL , |
||
unsigned int | skip_count = 0 , |
||
u16 | last = 0 |
||
) |
General networking checksum - Used for IP, TCP, UDP, ICMP, etc.
Computes the one's complement of the one's complement sum of all of the given bytes except for the memory at skip_byte for skip_count bytes (e.g. the checksum). Optionally resumes computation from the (given) last checksum.
Generated on Tue Jul 12 2022 11:59:40 by 1.7.2