Home
last modified time | relevance | path

Searched refs:poep (Results 1 – 9 of 9) sorted by relevance

/titanic_41/usr/src/cmd/cmd-inet/usr.lib/pppoe/
H A Dcommon.c153 poep_t *poep; in poe_mkheader() local
159 poep = (poep_t *)dptr; in poe_mkheader()
160 poep->poep_version_type = POE_VERSION; in poe_mkheader()
161 poep->poep_code = codeval; in poe_mkheader()
162 poep->poep_session_id = htons(sessionid); in poe_mkheader()
163 poep->poep_length = htons(0); in poe_mkheader()
164 return (poep); in poe_mkheader()
172 poe_tagcheck(const poep_t *poep, int length, const uint8_t *tptr) in poe_tagcheck() argument
177 if (poep == NULL || !IS_P2ALIGNED(poep, sizeof (uint16_t)) || in poe_tagcheck()
178 tptr == NULL || length < sizeof (*poep)) in poe_tagcheck()
[all …]
H A Dpppoed.c259 poep_t *poep = (poep_t *)databuf; in handle_input() local
287 poep = poe_mkheader(pkt_output, POECODE_PADT, in handle_input()
292 data.len = poe_length(poep) + sizeof (*poep); in handle_input()
293 data.buf = (caddr_t)poep; in handle_input()
318 if (datalen < sizeof (*poep)) { in handle_input()
325 if (poep->poep_code == POECODE_PADI) { in handle_input()
327 } else if (poep->poep_code == POECODE_PADR) { in handle_input()
331 poe_codename(poep->poep_code), ehost(&ptc->ptc_address)); in handle_input()
335 poe_codename(poep->poep_code)); in handle_input()
338 retv = locate_service(poep, datalen, ptc->ptc_name, &ptc->ptc_address, in handle_input()
[all …]
H A Dpppoec.c445 display_pppoe(FILE *out, const poep_t *poep, int plen, const ppptun_atype *pap) in display_pppoe() argument
461 tagp = (const uint8_t *)(poep + 1); in display_pppoe()
462 while (poe_tagcheck(poep, plen, tagp)) { in display_pppoe()
585 send_pppoe(const poep_t *poep, const char *msgname, in send_pppoe() argument
600 data.len = poe_length(poep) + sizeof (*poep); in send_pppoe()
601 data.buf = (caddr_t)poep; in send_pppoe()
619 poep_t *poep; in send_padi() local
622 poep = poe_mkheader(pkt_output, POECODE_PADI, 0); in send_padi()
623 (void) poe_add_str(poep, POETT_SERVICE, service); in send_padi()
624 (void) poe_add_long(poep, POETT_UNIQ, localid); in send_padi()
[all …]
H A Dcommon.h77 extern boolean_t poe_tagcheck(const poep_t *poep, int length,
79 extern int poe_add_str(poep_t *poep, uint16_t ttype, const char *str);
80 extern int poe_add_long(poep_t *poep, uint16_t ttype, uint32_t val);
81 extern int poe_two_longs(poep_t *poep, uint16_t ttype, uint32_t val1,
83 extern int poe_tag_copy(poep_t *poep, const uint8_t *tagp);
H A Dpppoed.h43 extern int locate_service(poep_t *poep, int plen, const char *iname,
45 extern int launch_service(int tunfd, poep_t *poep, void *srvp,
H A Doptions.c1882 locate_service(poep_t *poep, int plen, const char *iname, ppptun_atype *pap, in locate_service() argument
1898 ispadi = poep->poep_code == POECODE_PADI; in locate_service()
1937 tagp = (const uint8_t *)(poep + 1); in locate_service()
1938 while (poe_tagcheck(poep, plen, tagp)) { in locate_service()
2072 launch_service(int tunfd, poep_t *poep, void *srvp, struct ppptun_control *ptc) in launch_service() argument
2224 poep = poe_mkheader(pkt_output, POECODE_PADT, ptp.ptp_lsessid); in launch_service()
2225 poep->poep_session_id = htons(ptp.ptp_lsessid); in launch_service()
2226 (void) poe_add_str(poep, POETT_SYSERR, cp); in launch_service()
2230 data.len = poe_length(poep) + sizeof (*poep); in launch_service()
2231 data.buf = (caddr_t)poep; in launch_service()
[all …]
/titanic_41/usr/src/cmd/cmd-inet/usr.sbin/snoop/
H A Dsnoop_pppoe.c93 interpret_pppoe(int flags, poep_t *poep, int len) in interpret_pppoe() argument
95 uint8_t code = poep->poep_code; in interpret_pppoe()
101 payload = (uint8_t *)poep + sizeof (poep_t); in interpret_pppoe()
111 "Version = %d", POE_VERS(poep->poep_version_type)); in interpret_pppoe()
114 "Type = %d", POE_TYPE(poep->poep_version_type)); in interpret_pppoe()
120 "Session Id = %d", ntohs(poep->poep_session_id)); in interpret_pppoe()
123 "Length = %d bytes", ntohs(poep->poep_length)); in interpret_pppoe()
128 len = MIN(len, ntohs(poep->poep_length)); in interpret_pppoe()
130 if (poep->poep_code != 0 && poep->poep_length > 0) { in interpret_pppoe()
135 if (poep->poep_code == 0) { in interpret_pppoe()
/titanic_41/usr/src/cmd/cmd-inet/usr.bin/pppd/plugins/
H A Dpppoe.c309 const poep_t *poep; in handle_pppoe_input() local
328 poep = (const poep_t *)data->buf; in handle_pppoe_input()
329 tagp = (const uint8_t *)poep + offsetof(poep_t, poep_length); in handle_pppoe_input()
331 tagp = (const uint8_t *)(poep + 1); in handle_pppoe_input()
332 switch (poep->poep_code) { in handle_pppoe_input()
345 if (poep->poep_code == POECODE_PADM) { in handle_pppoe_input()
380 if (poep->poep_code == POECODE_PADM) { in handle_pppoe_input()
391 if (poep->poep_code == POECODE_PADM) { in handle_pppoe_input()
398 warn("unexpected PPPoE code %d from %s", poep->poep_code, in handle_pppoe_input()
/titanic_41/usr/src/uts/common/io/ppp/sppptun/
H A Dsppptun.c791 poep_t *poep; in sppptun_outpkt() local
935 mp = prependb(mp, sizeof (*poep) + len, POE_HDR_ALIGN); in sppptun_outpkt()
938 poep = (poep_t *)mp->b_rptr; in sppptun_outpkt()
939 poep->poep_version_type = POE_VERSION; in sppptun_outpkt()
940 poep->poep_code = POECODE_DATA; in sppptun_outpkt()
941 poep->poep_session_id = htons(tcl->tcl_rsessid); in sppptun_outpkt()
942 poep->poep_length = htons(msgsize(mp) - in sppptun_outpkt()
943 sizeof (*poep)); in sppptun_outpkt()
945 *(char *)(poep + 1) = '\0'; in sppptun_outpkt()
2077 const poep_t *poep; in sppptun_recv() local
[all …]