Lines Matching refs:poep

151 	poep_t *poep;  in poe_mkheader()  local
157 poep = (poep_t *)dptr; in poe_mkheader()
158 poep->poep_version_type = POE_VERSION; in poe_mkheader()
159 poep->poep_code = codeval; in poe_mkheader()
160 poep->poep_session_id = htons(sessionid); in poe_mkheader()
161 poep->poep_length = htons(0); in poe_mkheader()
162 return (poep); in poe_mkheader()
170 poe_tagcheck(const poep_t *poep, int length, const uint8_t *tptr) in poe_tagcheck() argument
175 if (poep == NULL || !IS_P2ALIGNED(poep, sizeof (uint16_t)) || in poe_tagcheck()
176 tptr == NULL || length < sizeof (*poep)) in poe_tagcheck()
179 plen = poe_length(poep); in poe_tagcheck()
180 if (plen + sizeof (*poep) > length) in poe_tagcheck()
183 tstart = (const uint8_t *)(poep+1); in poe_tagcheck()
199 poe_tag_insert(poep_t *poep, uint16_t ttype, const void *data, size_t dlen) in poe_tag_insert() argument
204 plen = poe_length(poep); in poe_tag_insert()
207 if (sizeof (*poep) + plen + POET_HDRLEN + dlen > PPPOE_MSGMAX) in poe_tag_insert()
209 dp = (uint8_t *)(poep + 1) + plen; in poe_tag_insert()
214 poep->poep_length = htons(plen + POET_HDRLEN + dlen); in poe_tag_insert()
223 poe_add_str(poep_t *poep, uint16_t ttype, const char *str) in poe_add_str() argument
225 return (poe_tag_insert(poep, ttype, str, strlen(str))); in poe_add_str()
233 poe_add_long(poep_t *poep, uint16_t ttype, uint32_t val) in poe_add_long() argument
236 return (poe_tag_insert(poep, ttype, &val, sizeof (val))); in poe_add_long()
244 poe_two_longs(poep_t *poep, uint16_t ttype, uint32_t val1, uint32_t val2) in poe_two_longs() argument
250 return (poe_tag_insert(poep, ttype, vals, sizeof (vals))); in poe_two_longs()
259 poe_tag_copy(poep_t *poep, const uint8_t *tagp) in poe_tag_copy() argument
265 plen = poe_length(poep); in poe_tag_copy()
266 if (sizeof (*poep) + plen + tlen > PPPOE_MSGMAX) in poe_tag_copy()
268 (void) memcpy((uint8_t *)(poep + 1) + plen, tagp, tlen); in poe_tag_copy()
269 poep->poep_length = htons(tlen + plen); in poe_tag_copy()