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.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

ip.h File Reference

ip.h File Reference

IP Packet header. More...

Go to the source code of this file.

Data Structures

struct  IP_Address
 IP Address memory map. More...
struct  IP_PacketHeader
 IP Packet memory map. More...

Functions

void fix_endian_ip (IP_PacketHeader *packet)
 Convert from wire to host or host to wire endianness.
const char * ipproto2name (u8 proto)
 Get a constant string of the given IP protocol (e.g. "ICMP", "TCP", "UDP") if known.
void print_ip (IP_PacketHeader *packet)
 Print the IP packet.
void str2ipaddr (const char *ip, IP_Address *addr)
 Parse the string (in decimal triple-dot notation) into the IP address structure.

Detailed Description

IP Packet header.

This file contains the memory map and associated functions for IP packet header creation and deconstruction.

Definition in file ip.h.


Function Documentation

void fix_endian_ip ( IP_PacketHeader packet )

Convert from wire to host or host to wire endianness.

Definition at line 58 of file ip.h.

const char* ipproto2name ( u8  proto )

Get a constant string of the given IP protocol (e.g. "ICMP", "TCP", "UDP") if known.

Definition at line 69 of file ip.h.

void print_ip ( IP_PacketHeader packet )

Print the IP packet.

Definition at line 82 of file ip.h.

void str2ipaddr ( const char *  ip,
IP_Address addr 
)

Parse the string (in decimal triple-dot notation) into the IP address structure.

Definition at line 105 of file ip.h.