Lines Matching refs:unit
566 ipcp_init(unit) in ipcp_init() argument
567 int unit; in ipcp_init()
569 fsm *f = &ipcp_fsm[unit];
570 ipcp_options *wo = &ipcp_wantoptions[unit];
571 ipcp_options *ao = &ipcp_allowoptions[unit];
573 f->unit = unit;
576 fsm_init(&ipcp_fsm[unit]);
618 ipcp_open(unit) in ipcp_open() argument
619 int unit; in ipcp_open()
621 fsm_open(&ipcp_fsm[unit]);
630 ipcp_close(unit, reason) in ipcp_close() argument
631 int unit; in ipcp_close()
634 fsm_close(&ipcp_fsm[unit], reason);
642 ipcp_lowerup(unit) in ipcp_lowerup() argument
643 int unit; in ipcp_lowerup()
645 fsm_lowerup(&ipcp_fsm[unit]);
653 ipcp_lowerdown(unit) in ipcp_lowerdown() argument
654 int unit; in ipcp_lowerdown()
656 fsm_lowerdown(&ipcp_fsm[unit]);
664 ipcp_input(unit, p, len) in ipcp_input() argument
665 int unit; in ipcp_input()
669 fsm_input(&ipcp_fsm[unit], p, len);
679 ipcp_protrej(unit) in ipcp_protrej() argument
680 int unit; in ipcp_protrej()
682 fsm_lowerdown(&ipcp_fsm[unit]);
694 ipcp_options *wo = &ipcp_wantoptions[f->unit];
695 ipcp_options *go = &ipcp_gotoptions[f->unit];
696 ipcp_options *ao = &ipcp_allowoptions[f->unit];
715 BZERO(&ipcp_hisoptions[f->unit], sizeof(ipcp_options));
727 ipcp_options *go = &ipcp_gotoptions[f->unit];
728 ipcp_options *wo = &ipcp_wantoptions[f->unit];
729 ipcp_options *ho = &ipcp_hisoptions[f->unit];
773 ipcp_options *go = &ipcp_gotoptions[f->unit];
880 ipcp_options *go = &ipcp_gotoptions[f->unit];
1025 ipcp_options *go = &ipcp_gotoptions[f->unit];
1273 ipcp_options *go = &ipcp_gotoptions[f->unit];
1425 ipcp_options *wo = &ipcp_wantoptions[f->unit];
1426 ipcp_options *ho = &ipcp_hisoptions[f->unit];
1427 ipcp_options *ao = &ipcp_allowoptions[f->unit];
1788 ipcp_options *ho = &ipcp_hisoptions[f->unit];
1789 ipcp_options *go = &ipcp_gotoptions[f->unit];
1790 ipcp_options *wo = &ipcp_wantoptions[f->unit];
1803 ipcp_close(f->unit, "Refused our IP address");
1808 ipcp_close(f->unit, "Could not determine local IP address");
1836 if (ho->hisaddr != 0 && !auth_ip_addr(f->unit, ho->hisaddr)) {
1838 ipcp_close(f->unit, "Unauthorized remote IP address");
1843 sifvjcomp(f->unit, ho->neg_vj, ho->cflag, ho->maxslotindex);
1852 ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr);
1868 if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
1871 ipcp_close(f->unit, "Interface configuration failed");
1876 if (ipcp_wantoptions[f->unit].default_route)
1877 if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
1878 default_route_set[f->unit] = 1;
1881 if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].proxy_arp)
1882 if (sifproxyarp(f->unit, ho->hisaddr))
1883 proxy_arp_set[f->unit] = 1;
1887 sifnpmode(f->unit, PPP_IP, NPMODE_PASS);
1896 if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
1899 ipcp_close(f->unit, "Interface configuration failed");
1908 if (!sifup(f->unit)) {
1911 ipcp_close(f->unit, "Interface configuration failed");
1916 if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
1919 ipcp_close(f->unit, "Interface configuration failed");
1923 sifnpmode(f->unit, PPP_IP, NPMODE_PASS);
1926 if (ipcp_wantoptions[f->unit].default_route)
1927 if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
1928 default_route_set[f->unit] = 1;
1931 if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].proxy_arp)
1932 if (sifproxyarp(f->unit, ho->hisaddr))
1933 proxy_arp_set[f->unit] = 1;
1946 reset_link_stats(f->unit);
1948 np_up(f->unit, PPP_IP);
1981 update_link_stats(f->unit);
1987 np_down(f->unit, PPP_IP);
1989 sifvjcomp(f->unit, 0, 0, 0);
2000 sifnpmode(f->unit, PPP_IP, NPMODE_QUEUE);
2002 sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
2003 sifdown(f->unit);
2004 ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
2005 ipcp_hisoptions[f->unit].hisaddr);
2021 ipcp_clear_addrs(unit, ouraddr, hisaddr) in ipcp_clear_addrs() argument
2022 int unit; in ipcp_clear_addrs()
2026 if (proxy_arp_set[unit]) {
2027 cifproxyarp(unit, hisaddr);
2028 proxy_arp_set[unit] = 0;
2030 if (default_route_set[unit]) {
2031 cifdefaultroute(unit, ouraddr, hisaddr);
2032 default_route_set[unit] = 0;
2034 cifaddr(unit, ouraddr, hisaddr);
2047 np_finished(f->unit, PPP_IP);