#ifndef PHSTBNETDEV_H    /* Multi-include protection.   <FILENAME>_H */
#define PHSTBNETDEV_H


/*****************************************************************************/
/* Copyright (c) 2008 NXP B.V.                                               */
/*                                                                           */
/* This program is free software; you can redistribute it and/or modify      */
/* it under the terms of the GNU General Public License as published by      */
/* the Free Software Foundation, using version 2 of the License.             */
/*                                                                           */
/* This program is distributed in the hope that it will be useful,           */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of            */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the              */
/* GNU General Public License for more details.                              */
/*                                                                           */
/* You should have received a copy of the GNU General Public License         */
/* along with this program; if not, write to the Free Software               */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307       */
/* USA.                                                                      */
/*                                                                           */
/*****************************************************************************/
/**
    @file   phStbNetDev.h
    @brief  External header file for this component.

@b  Component:  phStbNetDev

*//*

Rev Date        Author      Comments
--------------------------------------------------------------------------------
  1 20061201    batelaan    Initial
  2 20061218    batelaan    Rename IP macros.
  3 20070112    A.West      use 192... IP address
  4 20080326    batelaan    Use config variable CONFIG _ DSP _ IP _ SUBNET
  5 20080422    batelaan    Update file header
  6 20080603    batelaan    Rm PH_STBNETDEV_CONTROL_IP_STR and PH_STBNETDEV_DSP_IP_STR
                            Add phStbNetDev_GetSubNet
  7 20081030    batelaan    Fix unwanted auto-config variable detection
--------------------------------------------------------------------------------
    For consistency and standardisation retain the Section Separators.
*/

/*******************
* INCLUDE FILES    *
********************/

#include <tmNxTypes.h>

/**************************************************************************
* EXPORTED MACROS                          PH_STBTEMPLATE_<_WORD>+        *
***************************************************************************/

/** Name format of network device created by this driver. */
#define PH_STBNETDEV_DEVNAME "ipc0"

/** Magic 4 bytes located at the start of a packet pool. */
#define PH_STBNETDEV_POOL_MAGIC ((((UInt32)'I') << 24) | (((UInt32)'p') << 16) | (((UInt32)'c') << 8) | (((UInt32)'!')))

/** Max number of characters in a subnet name.
    Format "xxx.yyy.zzz".
    Excludes terminating NUL character. */
#define PH_STBNETDEV_SUBNET_LEN 11U

/*********************************************************************
* EXPORTED TYPEDEFS                      [p]phStbTemplate_<Word>+_t  *
**********************************************************************/

/**************************************************************************
* EXPORTED DATA                     g[k|p|kp|pk|kpk]phStbTemplate_<Word>+ *
***************************************************************************/

/****************************************************************************
* EXPORTED FUNCTION PROTOTYPES                    phStbTemplate[_<Word>+]   *
*****************************************************************************/

#ifdef __cplusplus
extern "C"
{
#endif

/** Return the physical uncached address of the packet pool.  Non-NULL when module is built for the control CPU,
    If loaded on the dsp CPU, the pool address should be obtained from the
    command line "pool" parameter.
*/
UInt32 phStbNetDev_GetPoolPhysical(void);

/** Returns the subnet address of the phStbNetDev instance.
    @param address @b OUT Subnet address.
    Must point to buffer at least PH_STBNETDEV_SUBNET_LEN + 1 long.
    @return TM_OK On success.
*/
tmErrorCode_t phStbNetDev_GetSubNet(char *address);

#ifdef __cplusplus
}
#endif

#endif /* PHSTBNETDEV_H      Do not add any thing below this line */
