#ifndef H_ED_IPV4_20040909121205
#define H_ED_IPV4_20040909121205

#ifdef __cplusplus
extern "C"
{
#endif

/* ---------------------------------------------------------------------
   (c) ED 2004
   Project      : CLIB
   Function     : IPV4
   Module       : IPV4
   File         : ipv4.h
   Created      : 09-09-2004
   Modified     : 26-08-2008
   --------------------------------------------------------------------- */

/* ---------------------------------------------------------------------
   Log

   1.1 26-08-2008 ipv4_str2num() accepts a NULL pointer as second parameter
   1.0 09-09-2004 Initial version
   0.0 09-09-2004 Created

   --------------------------------------------------------------------- */

#include <stddef.h>
#include "ed/inc/types.h"

/* macros ============================================================== */

#define IPV4_FMT "%u.%u.%u.%u"

/* constants =========================================================== */

enum
{
   IPV4_STR_SIZE = sizeof ("255.255.255.255"),
   IPV4_dummy
};

/* types =============================================================== */
/* structures ========================================================== */

typedef struct
{
   uint ip1;
   uint ip2;
   uint ip3;
   uint ip4;
}
ipv4_s;

/* internal public data ================================================ */
/* internal public functions =========================================== */
/* entry points ======================================================== */

   int ipv4_num2str (char *s, size_t size, ipv4_s const *pip);
   int ipv4_str2num (char const *s, ipv4_s * pip);

/* public data ========================================================= */

#ifdef __cplusplus
}
#endif

#endif                          /* H_ED_IPV4_20040909121205 */

/* Guards added by GUARD (c) AETA 2000-2003 Feb 14 2003 Ver. 1.5 */
