/home/aaron/olsrd-current/olsrd/lib/bmf/src/Packet.c File Reference

#include "Packet.h"
#include <stddef.h>
#include <assert.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include "defs.h"
Include dependency graph for Packet.c:

Go to the source code of this file.

Functions

int IsIpFragment (unsigned char *ipPacket)
u_int16_t GetIpTotalLength (unsigned char *ipPacket)
unsigned int GetIpHeaderLength (unsigned char *ipPacket)
u_int8_t GetTtl (unsigned char *ipPacket)
void SaveTtlAndChecksum (unsigned char *ipPacket, struct TSaveTtl *sttl)
void RestoreTtlAndChecksum (unsigned char *ipPacket, struct TSaveTtl *sttl)
void DecreaseTtlAndUpdateHeaderChecksum (unsigned char *ipPacket)
struct ip * GetIpHeader (unsigned char *encapsulationUdpData)
unsigned char * GetIpPacket (unsigned char *encapsulationUdpData)
u_int16_t GetEncapsulationUdpDataLength (unsigned char *encapsulationUdpData)

Function Documentation

void DecreaseTtlAndUpdateHeaderChecksum ( unsigned char *  ipPacket  ) 

Definition at line 188 of file Packet.c.

u_int16_t GetEncapsulationUdpDataLength ( unsigned char *  encapsulationUdpData  ) 

Definition at line 239 of file Packet.c.

References ENCAP_HDR_LEN, GetIpPacket(), and GetIpTotalLength().

Referenced by BmfEncapsulationPacketReceived(), and EncapsulateAndForwardPacket().

Here is the call graph for this function:

struct ip* GetIpHeader ( unsigned char *  encapsulationUdpData  )  [read]
unsigned int GetIpHeaderLength ( unsigned char *  ipPacket  ) 
unsigned char* GetIpPacket ( unsigned char *  encapsulationUdpData  ) 
u_int16_t GetIpTotalLength ( unsigned char *  ipPacket  ) 
u_int8_t GetTtl ( unsigned char *  ipPacket  ) 

Definition at line 124 of file Packet.c.

int IsIpFragment ( unsigned char *  ipPacket  ) 

Definition at line 62 of file Packet.c.

Referenced by BmfPacketCaptured().

void RestoreTtlAndChecksum ( unsigned char *  ipPacket,
struct TSaveTtl sttl 
)

Definition at line 166 of file Packet.c.

Referenced by PacketCrc32().

void SaveTtlAndChecksum ( unsigned char *  ipPacket,
struct TSaveTtl sttl 
)

Definition at line 144 of file Packet.c.

Referenced by PacketCrc32().

Generated on Wed Jun 19 06:00:04 2013 for olsrd by  doxygen 1.6.3