Kyle Lemons / HvZServerLib

Dependencies:   NetServices

Dependents:   HvZ

Embed: (wiki syntax)

« Back to documentation index

net.h File Reference

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.

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.

Definition at line 20 of file net.h.

void fix_endian_u16 ( u16 p )

Generic u16 endian swapping.

Definition at line 53 of file net.h.

void fix_endian_u32 ( u32 p )

Generic u32 endian swapping.

Definition at line 62 of file net.h.