Lines Matching refs:layer
45 #include "layer.h"
165 * the async layer record how much it's padded the packet in the mbuf's
253 int layer;
257 * ``push'' function in each layer starting at the top.
265 bp->priv = 0; /* Adjusted by the async layer ! */
266 for (layer = l->nlayers; layer && bp; layer--)
267 if (l->layer[layer - 1]->push != NULL)
268 bp = (*l->layer[layer - 1]->push)(b, l, bp, pri, &proto);
282 int layer;
286 * ``pull'' function in each layer starting at the bottom.
302 layer = 0;
304 while (layer || lbp[layer]) {
305 if (lbp[layer] == NULL) {
306 layer--;
309 bp = lbp[layer];
310 lbp[layer] = bp->m_nextpkt;
312 proto = lproto[layer];
314 if (l->layer[layer]->pull != NULL)
315 bp = (*l->layer[layer]->pull)(b, l, bp, &proto);
317 if (layer == l->nlayers - 1) {
318 /* We've just done the top layer, despatch the packet(s) */
327 lbp[++layer] = bp;
328 lproto[layer] = proto;
334 link_Stack(struct link *l, struct layer *layer)
336 if (l->nlayers == sizeof l->layer / sizeof l->layer[0]) {
337 log_Printf(LogERROR, "%s: Oops, cannot stack a %s layer...\n",
338 l->name, layer->name);
341 l->layer[l->nlayers++] = layer;
405 int layer;
407 for (layer = l->nlayers; layer; layer--)
408 prompt_Printf(arg->prompt, "%s%s", layer == l->nlayers ? "" : ", ",
409 l->layer[layer - 1]->name);