/******************************************************************************
*
* Filename: emac.h
*
* Definition of routine to set the MAC address.
*
* Revision information:
*
* 28AUG2004 kb_admin initial creation
*
* BEGIN_KBDD_BLOCK
* No warranty, expressed or implied, is included with this software. It is
* provided "AS IS" and no warranty of any kind including statutory or aspects
* relating to merchantability or fitness for any purpose is provided. All
* intellectual property rights of others is maintained with the respective
* owners. This software is not copyrighted and is intended for reference
* only.
* END_BLOCK
*
* $FreeBSD$
*****************************************************************************/
#ifndef _EMAC_H_
#define _EMAC_H_
extern void SetServerIPAddress(unsigned address);
extern void SetLocalIPAddress(unsigned address);
extern void EMAC_Init(void);
typedef struct {
unsigned address;
unsigned size;
typedef struct {
unsigned short frame_type;
unsigned short hard_type;
unsigned short prot_type;
unsigned char hard_size;
unsigned char prot_size;
unsigned short operation;
typedef struct {
unsigned char ip_v_hl;
unsigned char ip_tos;
unsigned short ip_len;
unsigned short ip_id;
unsigned short ip_off;
unsigned char ip_ttl;
unsigned char ip_p;
unsigned short ip_sum;
typedef struct {
unsigned short proto_mac;
unsigned short packet_length;
typedef struct {
unsigned short src_port;
unsigned short dst_port;
unsigned short udp_len;
unsigned short udp_cksum;
typedef struct {
unsigned short opcode;
unsigned short block_num;
// Preswap bytes
/* MII registers definition */
#if defined(BOOT_KB920X) || defined(BOOT_CENTIPAD)
#else
#endif
extern unsigned char localMACAddr[6];
extern unsigned localMAClow, localMAChigh;
extern unsigned localMACSet;
#define EMAC_Init()
#endif /* _EMAC_H_ */