#include "netlink.h"
#include "process.h"
-#define OPT_SOFTROUTE 1
-#define OPT_ALLOWROUTE 2
-
#define ICMP_TYPE_ECHO_REPLY 0
#define ICMP_TYPE_UNREACHABLE 3
struct icmphdr *h;
BUF_ALLOC(&st->icmp,"netlink_icmp_tmpl");
- buffer_init(&st->icmp,st->max_start_pad);
+ buffer_init(&st->icmp,calculate_max_start_pad());
h=buf_append(&st->icmp,sizeof(*h));
h->iph.version=4;
netlink_dump_routes(st,True);
}
-static void netlink_inst_output_config(void *sst, struct buffer_if *buf)
-{
-/* struct netlink_client *c=sst; */
-/* struct netlink *st=c->nst; */
-
- /* For now we don't output anything */
- BUF_ASSERT_USED(buf);
-}
-
-static bool_t netlink_inst_check_config(void *sst, struct buffer_if *buf)
-{
-/* struct netlink_client *c=sst; */
-/* struct netlink *st=c->nst; */
-
- BUF_ASSERT_USED(buf);
- /* We need to eat all of the configuration information from the buffer
- for backward compatibility. */
- buf->size=0;
- return True;
-}
-
static void netlink_inst_set_mtu(void *sst, int32_t new_mtu)
{
struct netlink_client *c=sst;
}
static void netlink_inst_reg(void *sst, netlink_deliver_fn *deliver,
- void *dst, int32_t max_start_pad,
- int32_t max_end_pad)
+ void *dst)
{
struct netlink_client *c=sst;
- struct netlink *st=c->nst;
- if (max_start_pad > st->max_start_pad) st->max_start_pad=max_start_pad;
- if (max_end_pad > st->max_end_pad) st->max_end_pad=max_end_pad;
c->deliver=deliver;
c->dst=dst;
}
c->ops.reg=netlink_inst_reg;
c->ops.deliver=netlink_inst_incoming;
c->ops.set_quality=netlink_set_quality;
- c->ops.output_config=netlink_inst_output_config;
- c->ops.check_config=netlink_inst_check_config;
c->ops.set_mtu=netlink_inst_set_mtu;
c->nst=st;
st->cl.type=CL_PURE;
st->cl.apply=netlink_inst_apply;
st->cl.interface=st;
- st->max_start_pad=0;
- st->max_end_pad=0;
st->clients=NULL;
st->routes=NULL;
st->n_clients=0;