}
static bool
-in_routes(const struct route_head *routes, struct route *route)
+in_routes(const struct route_head *routes, struct rt *route)
{
- const struct route *r;
+ const struct rt *r;
if (! routes)
return false;
configure (const struct options *options, struct interface *iface,
const struct dhcp *dhcp, bool up)
{
- struct route *route = NULL;
+ struct rt *route = NULL;
struct route_head *new_routes = NULL;
- struct route *new_route = NULL;
+ struct rt *new_route = NULL;
char *newhostname = NULL;
char *curhostname = NULL;
int remember;
new_routes = xmalloc(sizeof(*new_routes));
STAILQ_INIT(new_routes);
}
- new_route = xmalloc(sizeof (struct route));
- memcpy(new_route, route, sizeof (*new_route));
+ new_route = xmalloc(sizeof(*new_route));
+ memcpy(new_route, route, sizeof(*new_route));
STAILQ_INSERT_TAIL(new_routes, new_route, entries);
}
#ifdef THERE_IS_NO_FORK
unsigned int cidr;
unsigned int ocets;
struct route_head *routes = NULL;
- struct route *route;
+ struct rt *route;
/* Minimum is 5 -first is CIDR and a router length of 4 */
if (len < 5)
{
int i;
struct route_head *head = NULL;
- struct route *route;
+ struct rt *route;
for (i = 0; i < length; i += 8) {
if (! head) {
{
int i;
struct route_head *head = NULL;
- struct route *route = NULL;
+ struct rt *route = NULL;
for (i = 0; i < length; i += 4) {
if (! head) {
const struct options *options, bool overwrite)
{
FILE *f;
- struct route *route;
+ struct rt *route;
struct stat sb;
struct in_addr addr;
bool doneone;
char *p;
struct stat sb;
char *pp, *dest, *net, *gate;
- struct route *route;
+ struct rt *route;
if (stat(iface->infofile, &sb) != 0) {
logger(LOG_ERR, "lease information file `%s' does not exist",
void
free_route(struct route_head *routes)
{
- struct route *p;
- struct route *n;
+ struct rt *p;
+ struct rt *n;
if (!routes)
return;
#define NSTAILQ_FOREACH(var, head, field) \
if (head) STAILQ_FOREACH (var, head, field)
-struct route
+struct rt
{
struct in_addr destination;
struct in_addr netmask;
struct in_addr gateway;
- STAILQ_ENTRY (route) entries;
+ STAILQ_ENTRY (rt) entries;
};
-STAILQ_HEAD (route_head, route);
+STAILQ_HEAD (route_head, rt);
struct address
{
struct udp_dhcp_packet *packet;
} pay;
struct timespec ts;
- size_t len
+ size_t len;
unsigned char *payload;
bool have_data;