/* $Id: ip4_cidr.h,v 1.8 2005/07/05 21:15:46 gsson Exp $ */
/*
 * Copyright (c) 2005 Henrik Gustafsson <henrik.gustafsson@fnord.se>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifndef _CIDR_H_
#define _CIDR_H_

#include <sys/types.h>
#include "types.h"

int ip4_cidr_suffix(u_int32_t address);
int ip4_cidr_prefix(u_int32_t address);
u_int32_t ip4_cidr_top_address(u_int32_t address, u_int8_t prefix);
void ip4_cidr_output(FILE *f, u_int32_t address, u_int8_t prefix);

#endif /*_CIDR_H_*/


syntax highlighted by Code2HTML, v. 0.9.1