Main Page | Data Structures | File List | Data Fields | Globals

cctalk-pkt-utls.h File Reference


Detailed Description

Provide utility fns that are used in the client and server.

Author:
Rod Boyce
Date:
22/10/04
This module will provide pakcet utility functions

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define CRCGOODFCS   0
 Value returned from a checksum whrn including the CRC checksum.


Functions

teCCTALK_ERRORS cctu_FillOutPktHeader (tsCCTALK_SOCK_PKT_HDR *sPktHdr, unsigned long lPktType, unsigned long lPktSize)
 Fill out the packet header with the necessary fields.

tCHECKSUM cctu_ChecksumPacket (void *pvCctPkt, int zlPktLen)
 Will perform a checksum over a packet.


Define Documentation

#define CRCGOODFCS   0
 

Value returned from a checksum whrn including the CRC checksum.

Any array that already contains a crc component and is run through the crc including the new crc will return 0 on an intel little endian PC anyway


Function Documentation

tCHECKSUM cctu_ChecksumPacket void *  pvCctPkt,
int  zlPktLen
 

Will perform a checksum over a packet.

This checksum is currently a 16-bitn crc of the packet. If the packet was OK then a value of CRCGOODFCS (0xf0b8) should be return if the packet and the CRC has a CRC calculation performed over it.

Date:
22/10/04
Author:
Rod Boyce
Parameters:
pvCctPkt - The address of the packet to do the CRC over
zlPktLen - The number of bytes to do teh CRC on.
Returns:
CRCGOODFCS is returned for a valid packet anything else for an invalid packet

History

teCCTALK_ERRORS cctu_FillOutPktHeader tsCCTALK_SOCK_PKT_HDR sPktHdr,
unsigned long  lPktType,
unsigned long  lPktSize
 

Fill out the packet header with the necessary fields.

This fn will create the header for a cctalk packet

Date:
22/10/04
Author:
Rod Boyce
Parameters:
sPktHdr - pointer to the packet to fill out the data fields
lPktType - The type of packet we are creating
lpktsize - The size of this packet
Returns:
This function always returns eCCTALK_SUCESS

History


Generated on Thu Jan 20 16:12:07 2005 for Axis cctalk sub-system by doxygen 1.3.6