net/icmp.h File Reference


Detailed Description

ICMP Module for Modtronix TCP/IP Stack.

Author:
Modtronix Engineering
Dependencies:
stacktsk.h, ip.h, mac.h
Compiler:
MPLAB C18 v2.10 or higher
HITECH PICC-18 V8.35PL3 or higher

Description

This module contains the ICMP code.
For a detailed description, see the ICMP section of this document - in [Modules] [TCP/IP Stack] [TCP/IP Base Protocols].

#include "net\ip.h"
#include "net\mac.h"

Defines

#define ICMPIsTxReady()   MACIsTxReady(TRUE)
#define MAX_ICMP_DATA   (32)
#define MAX_ICMP_DATA_LEN   (MAX_ICMP_DATA)

Typedefs

typedef enum _ICMP_CODE ICMP_CODE
typedef enum _ICMP_CODE ICMP_REQUESTS

Enumerations

enum  _ICMP_CODE { ICMP_ECHO_REPLY = 0, ICMP_ECHO_REQUEST = 8 }

Functions

BOOL ICMPGet (ICMP_CODE *code, BYTE *data, BYTE *len, WORD *id, WORD *seq)
void ICMPPut (NODE_INFO *remote, ICMP_CODE code, BYTE *data, BYTE len, WORD id, WORD seq)


Define Documentation

 
#define ICMPIsTxReady (  )     MACIsTxReady(TRUE)

Returns:
TRUE if transmit buffer is ready
FALSE if transmit buffer is not ready

#define MAX_ICMP_DATA   (32)

#define MAX_ICMP_DATA_LEN   (MAX_ICMP_DATA)


Typedef Documentation

typedef enum _ICMP_CODE ICMP_CODE

typedef enum _ICMP_CODE ICMP_REQUESTS


Enumeration Type Documentation

enum _ICMP_CODE

Enumerator:
ICMP_ECHO_REPLY 
ICMP_ECHO_REQUEST 


Function Documentation

BOOL ICMPGet ( ICMP_CODE code,
BYTE data,
BYTE len,
WORD id,
WORD seq 
)

Gets the next ICMP packet

Pre-Condition:
MAC buffer contains ICMP type packet.
Parameters:
code Buffer to hold ICMP code value
data Buffer to hold ICMP data
len Buffer to hold ICMP data length
id Buffer to hold ICMP id
seq Buffer to hold ICMP seq
Returns:
TRUE if valid ICMP packet was received
FALSE otherwise

void ICMPPut ( NODE_INFO remote,
ICMP_CODE  code,
BYTE data,
BYTE  len,
WORD  id,
WORD  seq 
)

A ICMP packet is created and put on MAC.

Pre-Condition:
ICMPIsTxReady() == TRUE
Parameters:
remote Remote node info
code ICMP_ECHO_REPLY or ICMP_ECHO_REQUEST
data Data bytes
len Number of bytes to send
id ICMP identifier
seq ICMP sequence number


Generated on Mon Oct 9 13:22:07 2006 for SBC65EC Web Server by  doxygen 1.4.7