/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/pppoe/ |
H A D | common.c | 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() [all …]
|
H A D | pppoed.c | 259 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 D | pppoec.c | 445 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 D | common.h | 75 extern boolean_t poe_tagcheck(const poep_t *poep, int length, 77 extern int poe_add_str(poep_t *poep, uint16_t ttype, const char *str); 78 extern int poe_add_long(poep_t *poep, uint16_t ttype, uint32_t val); 79 extern int poe_two_longs(poep_t *poep, uint16_t ttype, uint32_t val1, 81 extern int poe_tag_copy(poep_t *poep, const uint8_t *tagp);
|
H A D | pppoed.h | 41 extern int locate_service(poep_t *poep, int plen, const char *iname, 43 extern int launch_service(int tunfd, poep_t *poep, void *srvp,
|
H A D | options.c | 1883 locate_service(poep_t *poep, int plen, const char *iname, ppptun_atype *pap, in locate_service() argument 1899 ispadi = poep->poep_code == POECODE_PADI; in locate_service() 1938 tagp = (const uint8_t *)(poep + 1); in locate_service() 1939 while (poe_tagcheck(poep, plen, tagp)) { in locate_service() 2073 launch_service(int tunfd, poep_t *poep, void *srvp, struct ppptun_control *ptc) in launch_service() argument 2225 poep = poe_mkheader(pkt_output, POECODE_PADT, ptp.ptp_lsessid); in launch_service() 2226 poep->poep_session_id = htons(ptp.ptp_lsessid); in launch_service() 2227 (void) poe_add_str(poep, POETT_SYSERR, cp); in launch_service() 2231 data.len = poe_length(poep) + sizeof (*poep); in launch_service() 2232 data.buf = (caddr_t)poep; in launch_service() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/ |
H A D | snoop_pppoe.c | 91 interpret_pppoe(int flags, poep_t *poep, int len) in interpret_pppoe() argument 93 uint8_t code = poep->poep_code; in interpret_pppoe() 99 payload = (uint8_t *)poep + sizeof (poep_t); in interpret_pppoe() 109 "Version = %d", POE_VERS(poep->poep_version_type)); in interpret_pppoe() 112 "Type = %d", POE_TYPE(poep->poep_version_type)); in interpret_pppoe() 118 "Session Id = %d", ntohs(poep->poep_session_id)); in interpret_pppoe() 121 "Length = %d bytes", ntohs(poep->poep_length)); in interpret_pppoe() 126 len = MIN(len, ntohs(poep->poep_length)); in interpret_pppoe() 128 if (poep->poep_code != 0 && poep->poep_length > 0) { in interpret_pppoe() 133 if (poep->poep_code == 0) { in interpret_pppoe()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/plugins/ |
H A D | pppoe.c | 309 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()
|
/illumos-gate/usr/src/uts/common/io/ppp/sppptun/ |
H A D | sppptun.c | 792 poep_t *poep; in sppptun_outpkt() local 936 mp = prependb(mp, sizeof (*poep) + len, POE_HDR_ALIGN); in sppptun_outpkt() 939 poep = (poep_t *)mp->b_rptr; in sppptun_outpkt() 940 poep->poep_version_type = POE_VERSION; in sppptun_outpkt() 941 poep->poep_code = POECODE_DATA; in sppptun_outpkt() 942 poep->poep_session_id = htons(tcl->tcl_rsessid); in sppptun_outpkt() 943 poep->poep_length = htons(msgsize(mp) - in sppptun_outpkt() 944 sizeof (*poep)); in sppptun_outpkt() 946 *(char *)(poep + 1) = '\0'; in sppptun_outpkt() 2081 const poep_t *poep; in sppptun_recv() local [all …]
|