Home | History | Annotate | Download | only in netinet

Lines Matching defs:pptp

6  * Simple PPTP transparent proxy for in-kernel use.  For use with the NAT
21 * PPTP proxy
84 * PPTP application proxy initialization.
94 MUTEX_INIT(&pptpfr.fr_lock, "PPTP proxy rule lock");
110 * Setup for a new PPTP proxy.
118 pptp_pxy_t *pptp;
138 KMALLOC(pptp, pptp_pxy_t *);
139 if (pptp == NULL) {
146 KFREE(pptp);
150 aps->aps_data = pptp;
151 aps->aps_psiz = sizeof(*pptp);
152 bzero((char *)pptp, sizeof(*pptp));
154 pptp->pptp_rule = ipn;
179 MUTEX_INIT(&ipn->in_lock, "pptp proxy NAT rule");
189 pptp->pptp_side[0].pptps_wptr = pptp->pptp_side[0].pptps_buffer;
190 pptp->pptp_side[1].pptps_wptr = pptp->pptp_side[1].pptps_buffer;
196 ipf_p_pptp_donatstate(fr_info_t *fin, nat_t *nat, pptp_pxy_t *pptp)
208 nat2 = pptp->pptp_nat;
209 if ((nat2 == NULL) || (pptp->pptp_state == NULL)) {
216 fi.fin_data[0] = pptp->pptp_call[0];
217 fi.fin_data[1] = pptp->pptp_call[1];
219 fi.fin_data[0] = pptp->pptp_call[1];
220 fi.fin_data[1] = pptp->pptp_call[0];
244 nat2 = ipf_nat_add(&fi, pptp->pptp_rule, &pptp->pptp_nat,
256 if (pptp->pptp_state != NULL) {
257 ipf_queueback(softc->ipf_ticks, &pptp->pptp_state->is_sti);
268 (void) ipf_state_add(softc, &fi, &pptp->pptp_state, 0);
276 * Try and build up the next PPTP message in the TCP stream and if we can
281 ipf_p_pptp_nextmessage(fr_info_t *fin, nat_t *nat, pptp_pxy_t *pptp, int rev)
295 pptps = &pptp->pptp_side[rev];
325 * PPTP has an 8 byte header that inclues the cookie.
383 ipf_p_pptp_message(fin, nat, pptp, pptps);
399 * handle a complete PPTP message
402 ipf_p_pptp_message(fr_info_t *fin, nat_t *nat, pptp_pxy_t *pptp,
410 ipf_p_pptp_mctl(fin, nat, pptp, pptps);
421 * handle a complete PPTP control message
424 ipf_p_pptp_mctl(fr_info_t *fin, nat_t *nat, pptp_pxy_t *pptp,
430 if (pptps == &pptp->pptp_side[0])
431 pptpo = &pptp->pptp_side[1];
433 pptpo = &pptp->pptp_side[0];
468 pptp->pptp_call[0] = buffer[7];
469 pptp->pptp_call[1] = buffer[6];
470 ipf_p_pptp_donatstate(fin, nat, pptp);
479 pptp->pptp_call[0] = buffer[7];
480 pptp->pptp_call[1] = buffer[6];
481 ipf_p_pptp_donatstate(fin, nat, pptp);
506 * For outgoing PPTP packets. refresh timeouts for NAT & state entries, if
512 pptp_pxy_t *pptp;
525 pptp = (pptp_pxy_t *)aps->aps_data;
526 pptp->pptp_side[1 - rev].pptps_next = ntohl(tcp->th_ack);
527 pptp->pptp_side[1 - rev].pptps_nexthdr = ntohl(tcp->th_ack);
528 pptp->pptp_side[rev].pptps_next = ntohl(tcp->th_seq) + 1;
529 pptp->pptp_side[rev].pptps_nexthdr = ntohl(tcp->th_seq) + 1;
542 pptp_pxy_t *pptp;
544 pptp = aps->aps_data;
546 if (pptp != NULL) {
553 if (pptp->pptp_state != NULL) {
554 ipf_state_setpending(softc, pptp->pptp_state);
558 if (pptp->pptp_nat != NULL)
559 ipf_nat_setpending(softc, pptp->pptp_nat);
560 pptp->pptp_rule->in_flags |= IPN_DELETE;
561 ipf_nat_rule_deref(softc, &pptp->pptp_rule);