Lines Matching refs:pid
66 u16 pid; /* protocol ID */ member
110 static inline struct proto *get_proto(struct net_device *dev, u16 pid) in get_proto() argument
114 switch (pid) { in get_proto()
126 static inline const char *proto_name(u16 pid) in proto_name() argument
128 switch (pid) { in proto_name()
204 static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code, in ppp_tx_cp() argument
217 if (pid == PID_LCP && (code == LCP_ECHO_REQ || code == LCP_ECHO_REPLY)) in ppp_tx_cp()
246 proto_name(pid), code_names[code], id, debug_buffer); in ppp_tx_cp()
249 ppp_hard_header(skb, dev, pid, NULL, NULL, 0); in ppp_tx_cp()
299 static void ppp_cp_event(struct net_device *dev, u16 pid, u16 event, u8 code, in ppp_cp_event() argument
304 struct proto *proto = get_proto(dev, pid); in ppp_cp_event()
312 proto_name(pid), event_names[event], state_names[proto->state]); in ppp_cp_event()
328 ppp_tx_cp(dev, pid, CP_CONF_REQ, proto->cr_id = ++ppp->seq, in ppp_cp_event()
331 ppp_tx_cp(dev, pid, CP_CONF_ACK, id, len, data); in ppp_cp_event()
333 ppp_tx_cp(dev, pid, code, id, len, data); in ppp_cp_event()
335 ppp_tx_cp(dev, pid, CP_TERM_REQ, ++ppp->seq, 0, NULL); in ppp_cp_event()
337 ppp_tx_cp(dev, pid, CP_TERM_ACK, id, 0, NULL); in ppp_cp_event()
339 ppp_tx_cp(dev, pid, CP_CODE_REJ, ++ppp->seq, len, data); in ppp_cp_event()
342 netdev_info(dev, "%s up\n", proto_name(pid)); in ppp_cp_event()
343 if (pid == PID_LCP) { in ppp_cp_event()
353 netdev_info(dev, "%s down\n", proto_name(pid)); in ppp_cp_event()
354 if (pid == PID_LCP) { in ppp_cp_event()
365 proto_name(pid), event_names[event], state_names[proto->state]); in ppp_cp_event()
369 static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id, in ppp_cp_parse_cr() argument
387 if (pid == PID_LCP) in ppp_cp_parse_cr()
419 ppp_cp_event(dev, pid, RCR_BAD, CP_CONF_REJ, id, rej_len, out); in ppp_cp_parse_cr()
421 ppp_cp_event(dev, pid, RCR_BAD, CP_CONF_NAK, id, nak_len, out); in ppp_cp_parse_cr()
423 ppp_cp_event(dev, pid, RCR_GOOD, CP_CONF_ACK, id, req_len, data); in ppp_cp_parse_cr()
442 u16 pid; in ppp_rx() local
457 pid = ntohs(hdr->protocol); in ppp_rx()
458 proto = get_proto(dev, pid); in ppp_rx()
485 printk(KERN_DEBUG "%s: RX %s %s\n", dev->name, proto_name(pid), in ppp_rx()
490 if (pid == PID_LCP) in ppp_rx()
493 pid = ntohs(*(__be16 *)skb->data); in ppp_rx()
494 if (pid == PID_LCP || pid == PID_IPCP || in ppp_rx()
495 pid == PID_IPV6CP) in ppp_rx()
496 ppp_cp_event(dev, pid, RXJ_BAD, 0, 0, in ppp_rx()
518 ppp_cp_parse_cr(dev, pid, cp->id, len, skb->data); in ppp_rx()
523 ppp_cp_event(dev, pid, RCA, 0, 0, 0, NULL); in ppp_rx()
529 ppp_cp_event(dev, pid, RCN, 0, 0, 0, NULL); in ppp_rx()
533 ppp_cp_event(dev, pid, RTR, 0, cp->id, 0, NULL); in ppp_rx()
537 ppp_cp_event(dev, pid, RTA, 0, 0, 0, NULL); in ppp_rx()
541 ppp_cp_event(dev, pid, RXJ_BAD, 0, 0, 0, NULL); in ppp_rx()
548 ppp_cp_event(dev, pid, RUC, 0, 0, len, cp); in ppp_rx()
582 ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, in ppp_timer()
586 ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, in ppp_timer()
589 ppp_cp_event(proto->dev, proto->pid, TO_BAD, 0, 0, in ppp_timer()
594 if (proto->pid != PID_LCP) in ppp_timer()
627 ppp->protos[IDX_LCP].pid = PID_LCP; in ppp_start()
628 ppp->protos[IDX_IPCP].pid = PID_IPCP; in ppp_start()
629 ppp->protos[IDX_IPV6CP].pid = PID_IPV6CP; in ppp_start()