Lines Matching refs:h
143 static int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
207 struct ppp_header *h; in sppp_input() local
230 h = (struct ppp_header *)skb->data; in sppp_input()
233 switch (h->address) { in sppp_input()
238 h->address, h->control, ntohs (h->protocol)); in sppp_input()
241 if (h->control != PPP_UI) in sppp_input()
247 h->address, h->control, ntohs (h->protocol)); in sppp_input()
250 switch (ntohs (h->protocol)) { in sppp_input()
255 &h->protocol); in sppp_input()
259 h->address, h->control, ntohs (h->protocol)); in sppp_input()
300 h->address, h->control, ntohs (h->protocol)); in sppp_input()
303 switch (ntohs (h->protocol)) { in sppp_input()
338 struct ppp_header *h; in sppp_hard_header() local
340 h=(struct ppp_header *)skb->data; in sppp_hard_header()
343 h->address = CISCO_UNICAST; in sppp_hard_header()
344 h->control = 0; in sppp_hard_header()
348 h->address = PPP_ALLSTATIONS; in sppp_hard_header()
349 h->control = PPP_UI; in sppp_hard_header()
353 h->protocol = htons(type); in sppp_hard_header()
358 h->protocol = htons(PPP_IP); in sppp_hard_header()
361 h->protocol = htons(PPP_IPX); in sppp_hard_header()
434 struct lcp_header *h; in sppp_lcp_input() local
446 h = (struct lcp_header *)skb->data; in sppp_lcp_input()
460 sppp_lcp_type_name (h->type), h->ident, ntohs (h->len)); in sppp_lcp_input()
462 sppp_print_bytes ((u8*) (h+1), len-4); in sppp_lcp_input()
465 if (len > ntohs (h->len)) in sppp_lcp_input()
466 len = ntohs (h->len); in sppp_lcp_input()
467 switch (h->type) { in sppp_lcp_input()
471 skb->len, h); in sppp_lcp_input()
480 if (len>4 && !sppp_lcp_conf_parse_options (sp, h, len, &rmagic)) in sppp_lcp_input()
505 h->ident, sizeof (opt), &opt); in sppp_lcp_input()
523 h->ident, len-4, h+1); in sppp_lcp_input()
542 h->ident, len-4, h+1); in sppp_lcp_input()
548 if (h->ident != sp->lcp.confid) in sppp_lcp_input()
569 if (h->ident != sp->lcp.confid) in sppp_lcp_input()
571 p = (u8*) (h+1); in sppp_lcp_input()
596 if (h->ident != sp->lcp.confid) in sppp_lcp_input()
610 sppp_cp_send (sp, PPP_LCP, LCP_TERM_ACK, h->ident, 0, 0); in sppp_lcp_input()
634 if (ntohl (*(long*)(h+1)) == sp->lcp.magic) { in sppp_lcp_input()
647 *(long*)(h+1) = htonl (sp->lcp.magic); in sppp_lcp_input()
648 sppp_cp_send (sp, PPP_LCP, LCP_ECHO_REPLY, h->ident, len-4, h+1); in sppp_lcp_input()
651 if (h->ident != sp->lcp.echoid) in sppp_lcp_input()
659 if (ntohl (*(long*)(h+1)) != sp->lcp.magic) in sppp_lcp_input()
671 struct cisco_packet *h; in sppp_cisco_input() local
680 h = (struct cisco_packet *)skb->data; in sppp_cisco_input()
685 ntohl (h->type), h->par1, h->par2, h->rel, in sppp_cisco_input()
686 h->time0, h->time1); in sppp_cisco_input()
687 switch (ntohl (h->type)) { in sppp_cisco_input()
691 dev->name, ntohl (h->type)); in sppp_cisco_input()
698 sp->pp_rseq = ntohl (h->par1); in sppp_cisco_input()
762 struct ppp_header *h; in sppp_cp_send() local
774 h = (struct ppp_header *)skb_put(skb, sizeof(struct ppp_header)); in sppp_cp_send()
775 h->address = PPP_ALLSTATIONS; /* broadcast address */ in sppp_cp_send()
776 h->control = PPP_UI; /* Unnumbered Info */ in sppp_cp_send()
777 h->protocol = htons (proto); /* Link Control Protocol */ in sppp_cp_send()
811 struct ppp_header *h; in sppp_cisco_send() local
824 h = (struct ppp_header *)skb_put (skb, sizeof(struct ppp_header)); in sppp_cisco_send()
825 h->address = CISCO_MULTICAST; in sppp_cisco_send()
826 h->control = 0; in sppp_cisco_send()
827 h->protocol = htons (CISCO_KEEPALIVE); in sppp_cisco_send()
1106 sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h, in sppp_lcp_conf_parse_options() argument
1117 p = (void*) (h+1); in sppp_lcp_conf_parse_options()
1147 sppp_cp_send (sp, PPP_LCP, LCP_CONF_REJ, h->ident, rlen, buf); in sppp_lcp_conf_parse_options()
1154 struct lcp_header *h; in sppp_ipcp_input() local
1165 h = (struct lcp_header *)skb->data; in sppp_ipcp_input()
1170 sppp_ipcp_type_name (h->type), h->ident, ntohs (h->len)); in sppp_ipcp_input()
1172 sppp_print_bytes ((u8*) (h+1), len-4); in sppp_ipcp_input()
1175 if (len > ntohs (h->len)) in sppp_ipcp_input()
1176 len = ntohs (h->len); in sppp_ipcp_input()
1177 switch (h->type) { in sppp_ipcp_input()
1180 sppp_cp_send (sp, PPP_IPCP, IPCP_CODE_REJ, ++sp->pp_seq, len, h); in sppp_ipcp_input()
1190 sppp_cp_send (sp, PPP_IPCP, LCP_CONF_REJ, h->ident, in sppp_ipcp_input()
1191 len-4, h+1); in sppp_ipcp_input()
1204 sppp_cp_send (sp, PPP_IPCP, IPCP_CONF_ACK, h->ident, in sppp_ipcp_input()
1214 if (h->ident != sp->ipcp.confid) in sppp_ipcp_input()
1229 if (h->ident != sp->ipcp.confid) in sppp_ipcp_input()
1240 sppp_cp_send (sp, PPP_IPCP, IPCP_TERM_ACK, h->ident, 0, 0); in sppp_ipcp_input()