network-data-0.1.0: Library for network data structures (ex: ip/udp/tcp headers and helper functions)

Data.IP

Description

The Data.IP library exports IPv4 address and header structures.

FIXME: There is currently no support for options fields of the IP header.

Synopsis

Documentation

data IPv4 Source

For IPv4 addresses. The internal representation is a bytestring so use the pretty print ipv4 function as needed (instead of show).

Constructors

IPv4 ByteString 

data IPv4Header Source

This IPv4 header structure lacks support for options. Ints are used for most integral data types and the binary instance hands the bit packing.

No warning is provided if a value is trunkated when packed!

Constructors

IPv4Hdr 

Instances

Eq IPv4Header 
Ord IPv4Header 
Show IPv4Header 
Binary IPv4Header

A dummy header with zeroed fields except version, header length and TTL (255).

L3Address IPv4 IPv4Header 
L3Header IPv4Header IPv4 CSum 

data IPv4Flag Source

Don't fragment, more fragment and reserved flags

Constructors

DF 
MF 
Res 

module Data.IPv6

ipv4 :: GenParser Char st IPv4Source

Parsec parser for IPv4 strings (ex: 33.44.255.17)