Lines Matching defs:tag
35 * Return the location where the next tag can be pu
41 (((char *) &ph->tag) + ntohs(ph->length));
46 * Update header to reflect the addition of a new tag
63 * Look for a tag of a specific type
70 struct pppoe_tag *pt = &ph->tag[0];
73 * Keep processing tags while a tag header will still fit.
75 * This check will ensure that the entire tag header pointed
81 * If the tag data would go past the end of the packet, abort.
96 /* We want to use tag names to reference into arrays containing the tag data.
97 This takes an RFC 2516 tag identifier and maps it into a local one.
100 static inline int tag_index(int tag){
101 switch(tag){
118 * Makes a copy of a tag into a PPPoE packe
167 * Verify that a packet has a tag containint a specific value
180 poe_info(ses,"Missing tag %d. Expected %s\n",
186 poe_info(ses,"Length mismatch on tag %d: expect: %d got: %d\n",
192 poe_info(ses,"Tag data mismatch on tag %d: expect: %s vs %s\n",
264 struct pppoe_tag *tag = NULL;
298 tag = next_tag(ph);
299 tag->tag_type = PTT_HOST_UNIQ;
300 tag->tag_len = htons(sizeof(struct session *));
301 memcpy(tag->tag_data,
305 add_tag(ph, tag);
310 tag = next_tag(ph);
311 tag->tag_type = PTT_SRV_NAME;
312 tag->tag_len = 0;
313 add_tag(ph, tag);
318 tag = next_tag(ph);
319 tag->tag_type = PTT_AC_NAME;
320 tag->tag_len = 0;
321 add_tag(ph, tag);
328 tag = next_tag(ph);
329 memcpy(tag, p->tags[i],
332 add_tag(ph, tag);