/* $Cambridge: hermes/src/prayer/accountd/ipaddr.h,v 1.1.1.1 2003/04/15 13:00:03 dpc22 Exp $ */
/************************************************
 *    Prayer - a Webmail Interface              *
 ************************************************/

/* Copyright (c) University of Cambridge 2000 - 2002 */
/* See the file NOTICE for conditions of use and distribution. */

/* External Interfere Prototypes for ipaddr.c */

struct ipaddr {
    unsigned long version;
    unsigned char addr[4];
};

struct ipaddr *ipaddr_create(struct pool *pool);
BOOL ipaddr_copy(struct ipaddr *addr1, struct ipaddr *addr2);
BOOL ipaddr_compare(struct ipaddr *addr1, struct ipaddr *addr2);
char *ipaddr_text(struct ipaddr *addr);
BOOL ipaddr_parse(struct ipaddr *addr, char *text);

void ipaddr_send_iostream(struct ipaddr *addr, struct iostream *stream);
BOOL ipaddr_fetch_iostream(struct ipaddr *addr, struct iostream *stream);

void
ipaddr_set(struct ipaddr *ipaddr,
           unsigned long ipvers, unsigned char *addr);


syntax highlighted by Code2HTML, v. 0.9.1