/*******************************************************************************
 * (c) Copyright 2015 Microsemi Corporation.  All rights reserved.
 *
 *
 *
 * SVN $Revision: $
 * SVN $Date: $
 */

#ifndef __NETWORK_UTILITIES_H__
#define __NETWORK_UTILITIES_H__

#include "stdint.h"

typedef struct networkConfig_s{
	unsigned long int	signature;
	unsigned char 		macAddr[6];
	unsigned short		options;
	unsigned long int	ipAddr;
	unsigned long int	nameSvr;
	unsigned long int	ipMask;
	unsigned long int	ipGate;
	unsigned char		hostName[20];
} networkConfig_t ;


#define MR_NET_SET_DHCP_MASK 	0x0001
#define MR_NET_SET_NET_EN_MASK 	0x0100

#ifdef CPP
	extern "C" {
#endif

	// Function Prototype
int FindLastFlashSectorOffset(unsigned long int *pLastFlashSectorOffset);
int get_board_network_settings(uint8_t netIdx, networkConfig_t *networkConfig);
int store_network_settings(uint8_t netIdx, networkConfig_t *networkConfig);

int mrGetNetworkSettings(uint8_t netIdx, networkConfig_t *networkConfig);
int mrSetNetworkSettings(uint8_t netIdx, networkConfig_t *networkConfig);


#ifdef CPP
	}
#endif
#endif /*__NETWORK_UTILITIES_H__ */

