net/arptsk.h File Reference


Detailed Description

ARP Server Module for Modtronix TCP/IP Stack.

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

Description

This module contains the ARP Server code.

#include "net\ip.h"

Functions

void ARPInit (void)
BOOL ARPIsResolved (IP_ADDR *IPAddr, MAC_ADDR *MACAddr)
BOOL ARPProcess (void)
void ARPResolve (IP_ADDR *IPAddr)


Function Documentation

void ARPInit ( void   ) 

ARP Cache is initialized.

BOOL ARPIsResolved ( IP_ADDR IPAddr,
MAC_ADDR MACAddr 
)

This function is used to retrieve the MAC Address for a given IP address. This information will be received via ARP after sending an ARP request over the network. If we have a destination IP address, but not it's MAC address, we will send an ARP request, and wait for an ARP reply. As soon as we receive the reply, the requested MAC address can be retrieve via this function.
Note: This function is available only when STACK_CLIENT_MODE is defined.

Parameters:
IPAddr IPAddress to be resolved.
MACAddr Buffer to hold corresponding MAC Address.
Returns:
TRUE if given IP Address has been resolved.
FALSE otherwise.
Examples:
ex_tcp_client.c, ex_udp_client.c, and ex_udp_client2.c.

BOOL ARPProcess ( void   ) 

Performes ARP processing.

Pre-Condition:
ARP packet is ready in MAC buffer.
Returns:
ARP FSM is executed.

void ARPResolve ( IP_ADDR IPAddr  ) 

An ARP request is sent. This function is available only when STACK_CLIENT_MODE is defined.

Parameters:
IPAddr - IP Address to be resolved. For example, if IP address is "192.168.1.0", then:
  • IPAddr.v[0] = 192
  • IPAddr.v[1] = 168
  • IPAddr.v[2] = 1
  • IPAddr.v[3] = 10
Examples:
ex_tcp_client.c, ex_udp_client.c, and ex_udp_client2.c.


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