/*
* Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
*
* 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 ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC 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.
*/
/* $Id: portset.c,v 1.4 2008/06/24 23:24:35 marka Exp $ */
/*! \file */
#include <config.h>
/*%
* Internal representation of portset. It's an array of 32-bit integers, each
* bit corresponding to a single port in the ascending order. For example,
* the second most significant bit of buf[0] corresponds to port 1.
*/
struct isc_portset {
};
static inline isc_boolean_t
}
static inline void
}
}
static inline void
}
}
return (ISC_R_NOMEMORY);
/* Make the set 'empty' by default */
return (ISC_R_SUCCESS);
}
void
}
}
unsigned int
}
void
}
void
}
void
{
in_port_t p;
p = port_lo;
do {
portset_add(portset, p);
} while (p++ < port_hi);
}
void
{
in_port_t p;
p = port_lo;
do {
portset_remove(portset, p);
} while (p++ < port_hi);
}