Lines Matching refs:us
88 static void cbcp_recvreq __P((cbcp_state *us, u_char *pckt, int len));
89 static void cbcp_recvack __P((cbcp_state *us, u_char *pckt, int len));
90 static void cbcp_send __P((cbcp_state *us, int code, u_char *buf, int len));
114 cbcp_state *us; local
116 us = &cbcp[unit];
117 BZERO(us, sizeof(cbcp_state));
118 us->us_unit = unit;
119 us->us_type |= (1 << CB_CONF_NO);
127 cbcp_state *us = &cbcp[unit]; local
130 dbglog("cbcp_lowerup: want: %d", us->us_type);
132 if (us->us_type == CB_CONF_USER)
133 dbglog("phone no: %s", us->us_number);
148 cbcp_state *us = &cbcp[unit]; local
170 us->us_id = id;
171 cbcp_recvreq(us, inp, len);
180 if (id != us->us_id) {
183 us->us_id);
187 cbcp_recvack(us, inp, len);
325 cbcp_recvreq(us, pckt, pcktlen) in cbcp_recvreq() argument
326 cbcp_state *us; in cbcp_recvreq()
336 us->us_allowed = 0;
357 us->us_allowed |= (1 << type);
384 cb_type = us->us_allowed & us->us_type;
390 len = 3 + 1 + strlen(us->us_number) + 1;
394 BCOPY(us->us_number, bufp, strlen(us->us_number) + 1);
395 cbcp_send(us, CBCP_RESP, buf, len);
406 cbcp_send(us, CBCP_RESP, buf, len);
417 cbcp_send(us, CBCP_RESP, buf, len);
424 lcp_close(us->us_unit, "No CBCP callback options available");
428 cbcp_send(us, code, buf, len) in cbcp_send() argument
429 cbcp_state *us; in cbcp_send()
444 PUTCHAR(us->us_id, outp);
450 output(us->us_unit, outpacket_buf, outlen + PPP_HDRLEN);
457 cbcp_recvack(us, pckt, len) in cbcp_recvack() argument
458 cbcp_state *us; in cbcp_recvack()
488 lcp_close(us->us_unit, "Call me back, please");