#ifndef __zarlink_h__
#define __zarlink_h__

#ifdef __cplusplus
extern "C" {
#endif



/*
 * Init routines for different components
 */

int zarlinkInit(void);
int zarlinkMiiInit(void);
int zarlinkFrameInit(void);

int zarlinkUtilInit(void);
int zarlinkMirrorInit(void);
int zarlinkCtrl1Init(void);
int zarlinkCtrl2Init(void);
int zarlinkResetInit(void);
int zarlinkRxFrameInit(void);

/*
 * Frame transmission/reception
 */

void zarlinkEthFrameWrite(void);
unsigned short zarlinkEthFrameRead(void);

/*
 * Utility routines (MAC addr set/get)
 */
 
int zarlinkCpuMacAddrSet(unsigned char *);
int zarlinkCpuMacAddrSetUip(unsigned char *);
int zarlinkCpuMacAddrGet(unsigned char *);

/* TODO: put htons, htonl, etc. routines in their own module at some point */
unsigned short byteSwap16(unsigned short);
void swapMac(unsigned char * pMac);
int parseDottedQuadV4(char *, unsigned char *);



#ifdef __cplusplus
}
#endif

#endif /* __zarlink_h__ */

