Property | Type | Description | |
---|---|---|---|
BroadcastAddress | MemBlock | ||
DestinationIP | MemBlock | ||
Protocol | Protocols | ||
SourceIP | MemBlock | ||
ZeroAddress | MemBlock |
Method | Description | |
---|---|---|
GenerateChecksum ( MemBlock header ) : ushort |
Generates an 16-bit IP (UDP, TCP) checksum based upon header and optional extra memory blocks placed into args.
|
|
IPPacket ( ) : Brunet | ||
IPPacket ( MemBlock Packet ) : Brunet |
Takes in a MemBlock and parses it into IP Header fields
|
|
IPPacket ( Protocols Protocol, MemBlock SourceIP, MemBlock DestinationIP, ICopyable Payload ) : Brunet |
Takes in the IP Header fields and a payload to create an IP Packet. Unlisted fields are generated by this constructor automatically.
|
|
IPPacket ( Protocols Protocol, MemBlock SourceIP, MemBlock DestinationIP, MemBlock hdr, ICopyable Payload ) : Brunet |
Takes in the IP Header fields and a payload to create an IP Packet. Unlisted fields are generated by this constructor automatically.
|
|
MakePseudoHeader ( MemBlock source_address, MemBlock destination_address, byte protocol, ushort length ) : MemBlock | ||
Translate ( MemBlock Packet, MemBlock SourceIP, MemBlock DestinationIP ) : MemBlock |
If we're not creating a packet from scratch, this will keep its integrity and transform UDP and TCP headers as well (due to their checksums being dependent on source and destination ip addresses.
|
Method | Description | |
---|---|---|
ChecksumTest ( ) : void |
public static GenerateChecksum ( MemBlock header ) : ushort | ||
header | MemBlock | The Header to base the checksum on. |
return | ushort |
public IPPacket ( MemBlock Packet ) : Brunet | ||
Packet | MemBlock | The IP Packet to parse. |
return | Brunet |
public IPPacket ( Protocols Protocol, MemBlock SourceIP, MemBlock DestinationIP, ICopyable Payload ) : Brunet | ||
Protocol | Protocols | The type of payload |
SourceIP | MemBlock | The packets originating ip address |
DestinationIP | MemBlock | The destination for the packet |
Payload | ICopyable | The data stored in the IP Packet |
return | Brunet |
public IPPacket ( Protocols Protocol, MemBlock SourceIP, MemBlock DestinationIP, MemBlock hdr, ICopyable Payload ) : Brunet | ||
Protocol | Protocols | The type of payload |
SourceIP | MemBlock | The packets originating ip address |
DestinationIP | MemBlock | The destination for the packet |
hdr | MemBlock | The original header of the IPPacket |
Payload | ICopyable | The data stored in the IP Packet |
return | Brunet |
public static MakePseudoHeader ( MemBlock source_address, MemBlock destination_address, byte protocol, ushort length ) : MemBlock | ||
source_address | MemBlock | |
destination_address | MemBlock | |
protocol | byte | |
length | ushort | |
return | MemBlock |
public static Translate ( MemBlock Packet, MemBlock SourceIP, MemBlock DestinationIP ) : MemBlock | ||
Packet | MemBlock | The packet to translate. |
SourceIP | MemBlock | The new source ip. |
DestinationIP | MemBlock | The new destination ip. |
return | MemBlock |