There is much code to compute these values, but they are never used
anywhere.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
}
static void netlink_inst_reg(void *sst, netlink_deliver_fn *deliver,
}
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, int32_t max_start_pad)
{
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;
{
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->deliver=deliver;
c->dst=dst;
}
st->cl.apply=netlink_inst_apply;
st->cl.interface=st;
st->max_start_pad=0;
st->cl.apply=netlink_inst_apply;
st->cl.interface=st;
st->max_start_pad=0;
st->clients=NULL;
st->routes=NULL;
st->n_clients=0;
st->clients=NULL;
st->routes=NULL;
st->n_clients=0;
void *dst; /* Pointer to host interface state */
cstring_t name;
int32_t max_start_pad;
void *dst; /* Pointer to host interface state */
cstring_t name;
int32_t max_start_pad;
struct ipset *networks; /* Local networks */
struct subnet_list *subnets; /* Same as networks, for display */
struct ipset *remote_networks; /* Allowable remote networks */
struct ipset *networks; /* Local networks */
struct subnet_list *subnets; /* Same as networks, for display */
struct ipset *remote_networks; /* Allowable remote networks */
struct comm_if {
void *st;
int32_t min_start_pad;
struct comm_if {
void *st;
int32_t min_start_pad;
comm_request_notify_fn *request_notify;
comm_release_notify_fn *release_notify;
comm_sendmsg_fn *sendmsg;
comm_request_notify_fn *request_notify;
comm_release_notify_fn *release_notify;
comm_sendmsg_fn *sendmsg;
/* TRANSFORM interface */
/* A reversable transformation. Transforms buffer in-place; may add
/* TRANSFORM interface */
/* A reversable transformation. Transforms buffer in-place; may add
- data to start or end. Maximum amount of data to be added specified
- in max_start_pad and max_end_pad. (Reverse transformations decrease
+ data to start or end. Maximum amount of data to be added before
+ the packet specified in max_start_pad. (Reverse transformations decrease
length, of course.) Transformations may be key-dependent, in which
case key material is passed in at initialisation time. They may
also depend on internal factors (eg. time) and keep internal
length, of course.) Transformations may be key-dependent, in which
case key material is passed in at initialisation time. They may
also depend on internal factors (eg. time) and keep internal
struct transform_if {
void *st;
struct transform_if {
void *st;
- int32_t max_start_pad; /* these three are all <<< INT_MAX */
- int32_t max_end_pad;
+ int32_t max_start_pad; /* these two are both <<< INT_MAX */
int32_t keylen; /* 0 means give the transform exactly as much as there is */
transform_createinstance_fn *create;
};
int32_t keylen; /* 0 means give the transform exactly as much as there is */
transform_createinstance_fn *create;
};
#define MAXIMUM_LINK_QUALITY 3
typedef void netlink_link_quality_fn(void *st, uint32_t quality);
typedef void netlink_register_fn(void *st, netlink_deliver_fn *deliver,
#define MAXIMUM_LINK_QUALITY 3
typedef void netlink_link_quality_fn(void *st, uint32_t quality);
typedef void netlink_register_fn(void *st, netlink_deliver_fn *deliver,
- void *dst, int32_t max_start_pad,
- int32_t max_end_pad);
+ void *dst, int32_t max_start_pad);
typedef void netlink_output_config_fn(void *st, struct buffer_if *buf);
typedef bool_t netlink_check_config_fn(void *st, struct buffer_if *buf);
typedef void netlink_set_mtu_fn(void *st, int32_t new_mtu);
typedef void netlink_output_config_fn(void *st, struct buffer_if *buf);
typedef bool_t netlink_check_config_fn(void *st, struct buffer_if *buf);
typedef void netlink_set_mtu_fn(void *st, int32_t new_mtu);
worst_##pad=thispad; \
}
COMPUTE_WORST(min_start_pad)
worst_##pad=thispad; \
}
COMPUTE_WORST(min_start_pad)
- COMPUTE_WORST(min_end_pad)
/* We need to register the remote networks with the netlink device */
st->netlink->reg(st->netlink->st, site_outgoing, st,
st->transform->max_start_pad+(4*4)+
/* We need to register the remote networks with the netlink device */
st->netlink->reg(st->netlink->st, site_outgoing, st,
st->transform->max_start_pad+(4*4)+
- worst_min_start_pad,
- st->transform->max_end_pad+worst_min_end_pad);
for (i=0; i<st->ncomms; i++)
st->comms[i]->request_notify(st->comms[i]->st, st, site_incoming);
for (i=0; i<st->ncomms; i++)
st->comms[i]->request_notify(st->comms[i]->st, st, site_incoming);
st->ops.st=st;
st->ops.max_start_pad=28; /* 4byte seqnum, 16byte pad, 4byte MACIV,
4byte IV */
st->ops.st=st;
st->ops.max_start_pad=28; /* 4byte seqnum, 16byte pad, 4byte MACIV,
4byte IV */
- st->ops.max_end_pad=16; /* 16byte CBCMAC */
/* We need 256*2 bits for serpent keys, 32 bits for CBC-IV and 32 bits
for CBCMAC-IV, and 32 bits for init sequence number */
/* We need 256*2 bits for serpent keys, 32 bits for CBC-IV and 32 bits
for CBCMAC-IV, and 32 bits for init sequence number */
st->p.padding_mask = padding_round-1;
st->ops.max_start_pad=0;
st->p.padding_mask = padding_round-1;
st->ops.max_start_pad=0;
- st->ops.max_end_pad= padding_round + st->p.tag_length + SEQLEN;
st->ops.keylen=0;
st->ops.create=transform_create;
st->ops.keylen=0;
st->ops.create=transform_create;
st->cl.interface=&st->ops;
st->ops.st=st;
st->ops.min_start_pad=0;
st->cl.interface=&st->ops;
st->ops.st=st;
st->ops.min_start_pad=0;
st->ops.request_notify=request_notify;
st->ops.release_notify=release_notify;
st->ops.sendmsg=udp_sendmsg;
st->ops.request_notify=request_notify;
st->ops.release_notify=release_notify;
st->ops.sendmsg=udp_sendmsg;