head 1.36; access; symbols netbsd-10-0-RELEASE:1.36 netbsd-10-0-RC6:1.36 netbsd-10-0-RC5:1.36 netbsd-10-0-RC4:1.36 netbsd-10-0-RC3:1.36 netbsd-10-0-RC2:1.36 thorpej-ifq:1.36.0.16 thorpej-ifq-base:1.36 thorpej-altq-separation:1.36.0.14 thorpej-altq-separation-base:1.36 netbsd-10-0-RC1:1.36 netbsd-10:1.36.0.12 netbsd-10-base:1.36 bouyer-sunxi-drm:1.36.0.10 bouyer-sunxi-drm-base:1.36 netbsd-9-3-RELEASE:1.28 thorpej-i2c-spi-conf2:1.36.0.8 thorpej-i2c-spi-conf2-base:1.36 thorpej-futex2:1.36.0.6 thorpej-futex2-base:1.36 thorpej-cfargs2:1.36.0.4 thorpej-cfargs2-base:1.36 cjep_sun2x-base1:1.36 cjep_sun2x:1.36.0.2 cjep_sun2x-base:1.36 cjep_staticlib_x-base1:1.36 netbsd-9-2-RELEASE:1.28 cjep_staticlib_x:1.31.0.4 cjep_staticlib_x-base:1.31 thorpej-i2c-spi-conf:1.31.0.2 thorpej-i2c-spi-conf-base:1.36 thorpej-cfargs:1.30.0.2 thorpej-cfargs-base:1.30 thorpej-futex:1.28.0.30 thorpej-futex-base:1.30 netbsd-9-1-RELEASE:1.28 bouyer-xenpvh-base2:1.28 phil-wifi-20200421:1.28 bouyer-xenpvh-base1:1.28 phil-wifi-20200411:1.28 bouyer-xenpvh:1.28.0.28 bouyer-xenpvh-base:1.28 is-mlppp:1.28.0.26 is-mlppp-base:1.28 phil-wifi-20200406:1.28 netbsd-8-2-RELEASE:1.28 ad-namecache-base3:1.28 netbsd-9-0-RELEASE:1.28 netbsd-9-0-RC2:1.28 ad-namecache-base2:1.28 ad-namecache-base1:1.28 ad-namecache:1.28.0.24 ad-namecache-base:1.28 netbsd-9-0-RC1:1.28 phil-wifi-20191119:1.28 netbsd-9:1.28.0.22 netbsd-9-base:1.28 phil-wifi-20190609:1.28 netbsd-8-1-RELEASE:1.28 netbsd-8-1-RC1:1.28 isaki-audio2:1.28.0.20 isaki-audio2-base:1.28 pgoyette-compat-merge-20190127:1.28 pgoyette-compat-20190127:1.28 pgoyette-compat-20190118:1.28 pgoyette-compat-1226:1.28 pgoyette-compat-1126:1.28 pgoyette-compat-1020:1.28 pgoyette-compat-0930:1.28 pgoyette-compat-0906:1.28 netbsd-7-2-RELEASE:1.27 pgoyette-compat-0728:1.28 netbsd-8-0-RELEASE:1.28 phil-wifi:1.28.0.18 phil-wifi-base:1.28 pgoyette-compat-0625:1.28 netbsd-8-0-RC2:1.28 pgoyette-compat-0521:1.28 pgoyette-compat-0502:1.28 pgoyette-compat-0422:1.28 netbsd-8-0-RC1:1.28 pgoyette-compat-0415:1.28 pgoyette-compat-0407:1.28 pgoyette-compat-0330:1.28 pgoyette-compat-0322:1.28 pgoyette-compat-0315:1.28 netbsd-7-1-2-RELEASE:1.27 pgoyette-compat:1.28.0.16 pgoyette-compat-base:1.28 netbsd-7-1-1-RELEASE:1.27 tls-maxphys-base-20171202:1.28 matt-nb8-mediatek:1.28.0.14 matt-nb8-mediatek-base:1.28 nick-nhusb-base-20170825:1.28 perseant-stdc-iso10646:1.28.0.12 perseant-stdc-iso10646-base:1.28 netbsd-8:1.28.0.10 netbsd-8-base:1.28 prg-localcount2-base3:1.28 prg-localcount2-base2:1.28 prg-localcount2-base1:1.28 prg-localcount2:1.28.0.8 prg-localcount2-base:1.28 pgoyette-localcount-20170426:1.28 bouyer-socketcan-base1:1.28 jdolecek-ncq:1.28.0.6 jdolecek-ncq-base:1.28 pgoyette-localcount-20170320:1.28 netbsd-7-1:1.27.0.42 netbsd-7-1-RELEASE:1.27 netbsd-7-1-RC2:1.27 nick-nhusb-base-20170204:1.28 netbsd-7-nhusb-base-20170116:1.27 bouyer-socketcan:1.28.0.4 bouyer-socketcan-base:1.28 pgoyette-localcount-20170107:1.28 netbsd-7-1-RC1:1.27 nick-nhusb-base-20161204:1.28 pgoyette-localcount-20161104:1.28 netbsd-7-0-2-RELEASE:1.27 nick-nhusb-base-20161004:1.28 localcount-20160914:1.28 netbsd-7-nhusb:1.27.0.40 netbsd-7-nhusb-base:1.27 pgoyette-localcount-20160806:1.28 pgoyette-localcount-20160726:1.28 pgoyette-localcount:1.28.0.2 pgoyette-localcount-base:1.28 nick-nhusb-base-20160907:1.28 nick-nhusb-base-20160529:1.28 netbsd-7-0-1-RELEASE:1.27 nick-nhusb-base-20160422:1.28 nick-nhusb-base-20160319:1.28 nick-nhusb-base-20151226:1.28 netbsd-7-0:1.27.0.38 netbsd-7-0-RELEASE:1.27 nick-nhusb-base-20150921:1.28 netbsd-7-0-RC3:1.27 netbsd-7-0-RC2:1.27 netbsd-7-0-RC1:1.27 nick-nhusb-base-20150606:1.27 nick-nhusb-base-20150406:1.27 nick-nhusb:1.27.0.36 nick-nhusb-base:1.27 netbsd-5-2-3-RELEASE:1.26 netbsd-5-1-5-RELEASE:1.26 netbsd-6-0-6-RELEASE:1.27 netbsd-6-1-5-RELEASE:1.27 netbsd-7:1.27.0.34 netbsd-7-base:1.27 yamt-pagecache-base9:1.27 yamt-pagecache-tag8:1.27 netbsd-6-1-4-RELEASE:1.27 netbsd-6-0-5-RELEASE:1.27 tls-earlyentropy:1.27.0.32 tls-earlyentropy-base:1.27 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.27 riastradh-drm2-base3:1.27 netbsd-6-1-3-RELEASE:1.27 netbsd-6-0-4-RELEASE:1.27 netbsd-5-2-2-RELEASE:1.26 netbsd-5-1-4-RELEASE:1.26 netbsd-6-1-2-RELEASE:1.27 netbsd-6-0-3-RELEASE:1.27 netbsd-5-2-1-RELEASE:1.26 netbsd-5-1-3-RELEASE:1.26 rmind-smpnet-nbase:1.27 netbsd-6-1-1-RELEASE:1.27 riastradh-drm2-base2:1.27 riastradh-drm2-base1:1.27 riastradh-drm2:1.27.0.30 riastradh-drm2-base:1.27 rmind-smpnet:1.27.0.22 rmind-smpnet-base:1.27 netbsd-6-1:1.27.0.28 netbsd-6-0-2-RELEASE:1.27 netbsd-6-1-RELEASE:1.27 khorben-n900:1.27.0.26 netbsd-6-1-RC4:1.27 netbsd-6-1-RC3:1.27 agc-symver:1.27.0.24 agc-symver-base:1.27 netbsd-6-1-RC2:1.27 netbsd-6-1-RC1:1.27 yamt-pagecache-base8:1.27 netbsd-5-2:1.26.0.28 netbsd-6-0-1-RELEASE:1.27 yamt-pagecache-base7:1.27 netbsd-5-2-RELEASE:1.26 netbsd-5-2-RC1:1.26 matt-nb6-plus-nbase:1.27 yamt-pagecache-base6:1.27 netbsd-6-0:1.27.0.20 netbsd-6-0-RELEASE:1.27 netbsd-6-0-RC2:1.27 tls-maxphys:1.27.0.18 tls-maxphys-base:1.27 matt-nb6-plus:1.27.0.16 matt-nb6-plus-base:1.27 netbsd-6-0-RC1:1.27 jmcneill-usbmp-base10:1.27 yamt-pagecache-base5:1.27 jmcneill-usbmp-base9:1.27 yamt-pagecache-base4:1.27 jmcneill-usbmp-base8:1.27 jmcneill-usbmp-base7:1.27 jmcneill-usbmp-base6:1.27 jmcneill-usbmp-base5:1.27 jmcneill-usbmp-base4:1.27 jmcneill-usbmp-base3:1.27 jmcneill-usbmp-pre-base2:1.27 jmcneill-usbmp-base2:1.27 netbsd-6:1.27.0.14 netbsd-6-base:1.27 netbsd-5-1-2-RELEASE:1.26 netbsd-5-1-1-RELEASE:1.26 jmcneill-usbmp:1.27.0.12 jmcneill-usbmp-base:1.27 jmcneill-audiomp3:1.27.0.10 jmcneill-audiomp3-base:1.27 yamt-pagecache-base3:1.27 yamt-pagecache-base2:1.27 yamt-pagecache:1.27.0.8 yamt-pagecache-base:1.27 rmind-uvmplock-nbase:1.27 cherry-xenmp:1.27.0.6 cherry-xenmp-base:1.27 bouyer-quota2-nbase:1.27 bouyer-quota2:1.27.0.4 bouyer-quota2-base:1.27 jruoho-x86intr:1.27.0.2 jruoho-x86intr-base:1.27 matt-mips64-premerge-20101231:1.27 matt-nb5-mips64-premerge-20101231:1.26 matt-nb5-pq3:1.26.0.26 matt-nb5-pq3-base:1.26 netbsd-5-1:1.26.0.24 netbsd-5-1-RELEASE:1.26 uebayasi-xip-base4:1.27 uebayasi-xip-base3:1.27 yamt-nfs-mp-base11:1.27 netbsd-5-1-RC4:1.26 matt-nb5-mips64-k15:1.26 uebayasi-xip-base2:1.27 yamt-nfs-mp-base10:1.27 netbsd-5-1-RC3:1.26 netbsd-5-1-RC2:1.26 uebayasi-xip-base1:1.27 netbsd-5-1-RC1:1.26 rmind-uvmplock:1.26.0.22 rmind-uvmplock-base:1.27 yamt-nfs-mp-base9:1.26 uebayasi-xip:1.26.0.20 uebayasi-xip-base:1.26 netbsd-5-0-2-RELEASE:1.26 matt-nb5-mips64-premerge-20091211:1.26 matt-premerge-20091211:1.26 yamt-nfs-mp-base8:1.26 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.26 matt-nb4-mips64-k7-u2a-k9b:1.26 matt-nb5-mips64-u1-k1-k5:1.26 yamt-nfs-mp-base7:1.26 matt-nb5-mips64:1.26.0.18 netbsd-5-0-1-RELEASE:1.26 jymxensuspend-base:1.26 yamt-nfs-mp-base6:1.26 yamt-nfs-mp-base5:1.26 yamt-nfs-mp-base4:1.26 jym-xensuspend-nbase:1.26 yamt-nfs-mp-base3:1.26 nick-hppapmap-base4:1.26 nick-hppapmap-base3:1.26 netbsd-5-0:1.26.0.16 netbsd-5-0-RELEASE:1.26 netbsd-5-0-RC4:1.26 netbsd-5-0-RC3:1.26 nick-hppapmap-base2:1.26 netbsd-5-0-RC2:1.26 jym-xensuspend:1.26.0.14 jym-xensuspend-base:1.26 netbsd-5-0-RC1:1.26 haad-dm-base2:1.26 haad-nbase2:1.26 ad-audiomp2:1.26.0.12 ad-audiomp2-base:1.26 netbsd-5:1.26.0.10 netbsd-5-base:1.26 nick-hppapmap:1.26.0.8 nick-hppapmap-base:1.26 matt-mips64-base2:1.26 matt-mips64:1.24.0.66 haad-dm-base1:1.26 wrstuden-revivesa-base-4:1.26 netbsd-4-0-1-RELEASE:1.24 wrstuden-revivesa-base-3:1.26 wrstuden-revivesa-base-2:1.26 wrstuden-fixsa-newbase:1.24 nick-csl-alignment-base5:1.24 haad-dm:1.26.0.6 haad-dm-base:1.26 wrstuden-revivesa-base-1:1.26 simonb-wapbl-nbase:1.26 yamt-pf42-base4:1.26 simonb-wapbl:1.26.0.4 simonb-wapbl-base:1.26 yamt-pf42-base3:1.26 hpcarm-cleanup-nbase:1.26 yamt-pf42-baseX:1.25 yamt-pf42-base2:1.26 yamt-nfs-mp-base2:1.26 wrstuden-revivesa:1.26.0.2 wrstuden-revivesa-base:1.26 yamt-nfs-mp:1.25.0.10 yamt-nfs-mp-base:1.25 yamt-pf42:1.25.0.8 yamt-pf42-base:1.25 ad-socklock-base1:1.25 yamt-lazymbuf-base15:1.25 yamt-lazymbuf-base14:1.25 keiichi-mipv6-nbase:1.25 mjf-devfs2:1.25.0.6 mjf-devfs2-base:1.26 nick-net80211-sync:1.25.0.4 nick-net80211-sync-base:1.25 keiichi-mipv6:1.25.0.2 keiichi-mipv6-base:1.25 bouyer-xeni386-merge1:1.24 matt-armv6-prevmlocking:1.24 wrstuden-fixsa-base-1:1.24 vmlocking2-base3:1.24 netbsd-4-0:1.24.0.64 netbsd-4-0-RELEASE:1.24 bouyer-xeni386-nbase:1.24 yamt-kmem-base3:1.24 cube-autoconf:1.24.0.62 cube-autoconf-base:1.24 yamt-kmem-base2:1.24 bouyer-xeni386:1.24.0.60 bouyer-xeni386-base:1.24 yamt-kmem:1.24.0.58 yamt-kmem-base:1.24 vmlocking2-base2:1.24 reinoud-bufcleanup-nbase:1.24 vmlocking2:1.24.0.56 vmlocking2-base1:1.24 netbsd-4-0-RC5:1.24 matt-nb4-arm:1.24.0.54 matt-nb4-arm-base:1.24 matt-armv6-nbase:1.25 jmcneill-base:1.24 netbsd-4-0-RC4:1.24 mjf-devfs:1.24.0.52 mjf-devfs-base:1.24 bouyer-xenamd64-base2:1.24 vmlocking-nbase:1.24 yamt-x86pmap-base4:1.24 bouyer-xenamd64:1.24.0.50 bouyer-xenamd64-base:1.24 netbsd-4-0-RC3:1.24 yamt-x86pmap-base3:1.24 yamt-x86pmap-base2:1.24 netbsd-4-0-RC2:1.24 yamt-x86pmap:1.24.0.48 yamt-x86pmap-base:1.24 netbsd-4-0-RC1:1.24 matt-armv6:1.24.0.46 matt-armv6-base:1.24 matt-mips64-base:1.24 jmcneill-pm:1.24.0.44 jmcneill-pm-base:1.24 hpcarm-cleanup:1.24.0.42 hpcarm-cleanup-base:1.25 nick-csl-alignment:1.24.0.40 nick-csl-alignment-base:1.24 netbsd-3-1-1-RELEASE:1.23 netbsd-3-0-3-RELEASE:1.23 yamt-idlelwp-base8:1.24 wrstuden-fixsa:1.24.0.38 wrstuden-fixsa-base:1.24 thorpej-atomic:1.24.0.36 thorpej-atomic-base:1.24 reinoud-bufcleanup:1.24.0.34 reinoud-bufcleanup-base:1.24 mjf-ufs-trans:1.24.0.32 mjf-ufs-trans-base:1.24 vmlocking:1.24.0.30 vmlocking-base:1.24 ad-audiomp:1.24.0.28 ad-audiomp-base:1.24 yamt-idlelwp:1.24.0.26 post-newlock2-merge:1.24 newlock2-nbase:1.24 yamt-splraiseipl-base5:1.24 yamt-splraiseipl-base4:1.24 yamt-splraiseipl-base3:1.24 abandoned-netbsd-4-base:1.24 abandoned-netbsd-4:1.24.0.18 netbsd-3-1:1.23.0.28 netbsd-3-1-RELEASE:1.23 netbsd-3-0-2-RELEASE:1.23 yamt-splraiseipl-base2:1.24 netbsd-3-1-RC4:1.23 yamt-splraiseipl:1.24.0.22 yamt-splraiseipl-base:1.24 netbsd-3-1-RC3:1.23 yamt-pdpolicy-base9:1.24 newlock2:1.24.0.20 newlock2-base:1.24 yamt-pdpolicy-base8:1.24 netbsd-3-1-RC2:1.23 netbsd-3-1-RC1:1.23 yamt-pdpolicy-base7:1.24 netbsd-4:1.24.0.24 netbsd-4-base:1.24 yamt-pdpolicy-base6:1.24 chap-midi-nbase:1.24 netbsd-3-0-1-RELEASE:1.23 gdamore-uart:1.24.0.16 gdamore-uart-base:1.24 simonb-timcounters-final:1.24 yamt-pdpolicy-base5:1.24 chap-midi:1.24.0.14 chap-midi-base:1.24 yamt-pdpolicy-base4:1.24 yamt-pdpolicy-base3:1.24 peter-altq-base:1.24 peter-altq:1.24.0.12 yamt-pdpolicy-base2:1.24 elad-kernelauth-base:1.24 elad-kernelauth:1.24.0.10 yamt-pdpolicy:1.24.0.8 yamt-pdpolicy-base:1.24 yamt-uio_vmspace-base5:1.24 simonb-timecounters:1.24.0.6 simonb-timecounters-base:1.24 rpaulo-netinet-merge-pcb:1.24.0.4 rpaulo-netinet-merge-pcb-base:1.24 yamt-uio_vmspace:1.24.0.2 netbsd-3-0:1.23.0.26 netbsd-3-0-RELEASE:1.23 netbsd-3-0-RC6:1.23 yamt-readahead-base3:1.23 netbsd-3-0-RC5:1.23 netbsd-3-0-RC4:1.23 netbsd-3-0-RC3:1.23 yamt-readahead-base2:1.23 netbsd-3-0-RC2:1.23 yamt-readahead-pervnode:1.23 yamt-readahead-perfile:1.23 yamt-readahead:1.23.0.24 yamt-readahead-base:1.23 netbsd-3-0-RC1:1.23 yamt-vop-base3:1.23 netbsd-2-0-3-RELEASE:1.23 netbsd-2-1:1.23.0.22 yamt-vop-base2:1.23 thorpej-vnode-attr:1.23.0.20 thorpej-vnode-attr-base:1.23 netbsd-2-1-RELEASE:1.23 yamt-vop:1.23.0.18 yamt-vop-base:1.23 netbsd-2-1-RC6:1.23 netbsd-2-1-RC5:1.23 netbsd-2-1-RC4:1.23 netbsd-2-1-RC3:1.23 netbsd-2-1-RC2:1.23 netbsd-2-1-RC1:1.23 yamt-lazymbuf:1.23.0.16 yamt-km-base4:1.23 netbsd-2-0-2-RELEASE:1.23 yamt-km-base3:1.23 netbsd-3:1.23.0.14 netbsd-3-base:1.23 yamt-km-base2:1.23 yamt-km:1.23.0.10 yamt-km-base:1.23 kent-audio2:1.23.0.8 kent-audio2-base:1.23 netbsd-2-0-1-RELEASE:1.23 kent-audio1-beforemerge:1.23 netbsd-2:1.23.0.6 netbsd-2-base:1.23 kent-audio1:1.23.0.4 kent-audio1-base:1.23 netbsd-2-0-RELEASE:1.23 netbsd-2-0-RC5:1.23 netbsd-2-0-RC4:1.23 netbsd-2-0-RC3:1.23 netbsd-2-0-RC2:1.23 netbsd-2-0-RC1:1.23 netbsd-2-0:1.23.0.2 netbsd-2-0-base:1.23 netbsd-1-6-PATCH002-RELEASE:1.17 netbsd-1-6-PATCH002:1.17 netbsd-1-6-PATCH002-RC4:1.17 netbsd-1-6-PATCH002-RC3:1.17 netbsd-1-6-PATCH002-RC2:1.17 netbsd-1-6-PATCH002-RC1:1.17 ktrace-lwp:1.18.0.2 ktrace-lwp-base:1.24 netbsd-1-6-PATCH001:1.17 netbsd-1-6-PATCH001-RELEASE:1.17 netbsd-1-6-PATCH001-RC3:1.17 netbsd-1-6-PATCH001-RC2:1.17 netbsd-1-6-PATCH001-RC1:1.17 nathanw_sa_end:1.7.2.8 nathanw_sa_before_merge:1.18 fvdl_fs64_base:1.17 gmcgarry_ctxsw:1.17.0.8 gmcgarry_ctxsw_base:1.17 gmcgarry_ucred:1.17.0.6 gmcgarry_ucred_base:1.17 nathanw_sa_base:1.18 kqueue-aftermerge:1.17 kqueue-beforemerge:1.17 netbsd-1-6-RELEASE:1.17 netbsd-1-6-RC3:1.17 netbsd-1-6-RC2:1.17 netbsd-1-6-RC1:1.17 netbsd-1-6:1.17.0.4 netbsd-1-6-base:1.17 gehenna-devsw:1.17.0.2 gehenna-devsw-base:1.17 netbsd-1-5-PATCH003:1.6 eeh-devprop:1.16.0.4 eeh-devprop-base:1.16 newlock:1.16.0.2 newlock-base:1.16 ifpoll-base:1.15 thorpej-mips-cache:1.9.0.6 thorpej-mips-cache-base:1.9 thorpej-devvp-base3:1.9 thorpej-devvp-base2:1.9 post-chs-ubcperf:1.9 pre-chs-ubcperf:1.9 thorpej-devvp:1.9.0.4 thorpej-devvp-base:1.9 netbsd-1-5-PATCH002:1.6 kqueue:1.9.0.2 kqueue-base:1.17 netbsd-1-5-PATCH001:1.6 thorpej_scsipi_beforemerge:1.9 nathanw_sa:1.7.0.2 thorpej_scsipi_nbase:1.9 netbsd-1-5-RELEASE:1.6 netbsd-1-5-BETA2:1.6 netbsd-1-5-BETA:1.6 netbsd-1-4-PATCH003:1.2.2.1 netbsd-1-5-ALPHA2:1.6 netbsd-1-5:1.6.0.4 netbsd-1-5-base:1.6 minoura-xpg4dl-base:1.6 minoura-xpg4dl:1.6.0.2 netbsd-1-4-PATCH002:1.2.2.1 chs-ubc2-newbase:1.4 wrstuden-devbsize-19991221:1.4 wrstuden-devbsize:1.4.0.8 wrstuden-devbsize-base:1.4 kame_141_19991130:1.2.2.1 comdex-fall-1999:1.4.0.6 comdex-fall-1999-base:1.4 fvdl-softdep:1.4.0.4 fvdl-softdep-base:1.4 thorpej_scsipi:1.4.0.2 thorpej_scsipi_base:1.9 netbsd-1-4-PATCH001:1.2.2.1 kame_14_19990705:1.2.2.1 kame_14_19990628:1.2.2.1 kame:1.2.2.1.0.4 chs-ubc2:1.2.2.1.0.2 chs-ubc2-base:1.4 netbsd-1-4-RELEASE:1.2.2.1 netbsd-1-4:1.2.0.2 netbsd-1-4-base:1.2; locks; strict; comment @ * @; 1.36 date 2021.05.14.08.41.25; author yamaguchi; state Exp; branches; next 1.35; commitid Afs9XkPOLS0VP5TC; 1.35 date 2021.05.11.06.42.42; author yamaguchi; state Exp; branches; next 1.34; commitid nO7Q6sVfI6R7hHSC; 1.34 date 2021.05.11.01.27.45; author yamaguchi; state Exp; branches; next 1.33; commitid WexPRKhLJRhvwFSC; 1.33 date 2021.05.11.01.15.11; author yamaguchi; state Exp; branches; next 1.32; commitid AGOQnS1GTCNqrFSC; 1.32 date 2021.05.11.01.00.49; author yamaguchi; state Exp; branches; next 1.31; commitid tcuga0YU4UfJnFSC; 1.31 date 2021.04.23.01.13.25; author yamaguchi; state Exp; branches 1.31.2.1 1.31.4.1; next 1.30; commitid U8AoPgqBAdPfXlQC; 1.30 date 2020.12.02.14.20.20; author wiz; state Exp; branches; next 1.29; commitid Uu2OA7DInMcaXayC; 1.29 date 2020.11.25.10.30.51; author yamaguchi; state Exp; branches; next 1.28; commitid gqQ4bagmEftfUfxC; 1.28 date 2015.09.06.06.01.01; author dholland; state Exp; branches 1.28.30.1; next 1.27; 1.27 date 2010.04.20.14.32.03; author jmcneill; state Exp; branches 1.27.18.1 1.27.36.1; next 1.26; 1.26 date 2008.04.28.20.24.09; author martin; state Exp; branches 1.26.20.1 1.26.22.1; next 1.25; 1.25 date 2008.02.20.17.05.53; author matt; state Exp; branches 1.25.6.1 1.25.8.1 1.25.10.1; next 1.24; 1.24 date 2005.12.10.23.21.38; author elad; state Exp; branches 1.24.46.1; next 1.23; 1.23 date 2003.12.26.23.39.23; author martin; state Exp; branches 1.23.16.1; next 1.22; 1.22 date 2003.11.28.08.56.48; author keihan; state Exp; branches; next 1.21; 1.21 date 2003.09.11.18.04.51; author martin; state Exp; branches; next 1.20; 1.20 date 2003.09.05.23.13.15; author martin; state Exp; branches; next 1.19; 1.19 date 2003.09.03.20.48.46; author martin; state Exp; branches; next 1.18; 1.18 date 2003.01.06.12.46.13; author wiz; state Exp; branches 1.18.2.1; next 1.17; 1.17 date 2002.04.14.12.24.28; author martin; state Exp; branches; next 1.16; 1.16 date 2002.03.02.16.23.42; author martin; state Exp; branches; next 1.15; 1.15 date 2002.01.15.12.28.08; author martin; state Exp; branches; next 1.14; 1.14 date 2002.01.07.10.49.02; author martin; state Exp; branches; next 1.13; 1.13 date 2002.01.06.20.14.29; author martin; state Exp; branches; next 1.12; 1.12 date 2002.01.04.12.21.25; author martin; state Exp; branches; next 1.11; 1.11 date 2001.12.31.21.55.46; author thorpej; state Exp; branches; next 1.10; 1.10 date 2001.12.08.19.46.39; author martin; state Exp; branches; next 1.9; 1.9 date 2001.04.09.19.33.01; author martin; state Exp; branches 1.9.2.1; next 1.8; 1.8 date 2001.03.25.19.39.20; author martin; state Exp; branches; next 1.7; 1.7 date 2000.08.10.11.48.46; author ad; state Exp; branches 1.7.2.1; next 1.6; 1.6 date 2000.05.02.12.43.16; author itojun; state Exp; branches; next 1.5; 1.5 date 2000.03.23.07.03.25; author thorpej; state Exp; branches; next 1.4; 1.4 date 99.04.04.06.57.03; author explorer; state Exp; branches 1.4.2.1; next 1.3; 1.3 date 99.04.04.06.07.56; author explorer; state Exp; branches; next 1.2; 1.2 date 99.03.25.05.25.42; author explorer; state Exp; branches 1.2.2.1; next 1.1; 1.1 date 99.03.25.03.38.00; author explorer; state Exp; branches; next ; 1.31.2.1 date 2021.05.13.00.47.33; author thorpej; state Exp; branches; next 1.31.2.2; commitid hlq0lOvHnylpfVSC; 1.31.2.2 date 2021.06.17.04.46.35; author thorpej; state Exp; branches; next ; commitid d7CrUzY34skBrrXC; 1.31.4.1 date 2021.05.31.22.15.21; author cjep; state Exp; branches; next ; commitid eWz9SBW0XqKjJlVC; 1.28.30.1 date 2020.12.14.14.38.15; author thorpej; state Exp; branches; next ; commitid S4HwP6n7zzL3FIzC; 1.27.18.1 date 2017.12.03.11.39.02; author jdolecek; state Exp; branches; next ; commitid XcIYRZTAh1LmerhA; 1.27.36.1 date 2015.09.22.12.06.10; author skrll; state Exp; branches; next ; 1.26.20.1 date 2010.04.30.14.44.19; author uebayasi; state Exp; branches; next ; 1.26.22.1 date 2010.05.30.05.18.01; author rmind; state Exp; branches; next ; 1.25.6.1 date 2008.06.02.13.24.22; author mjf; state Exp; branches; next ; 1.25.8.1 date 2008.05.18.12.35.27; author yamt; state Exp; branches; next ; 1.25.10.1 date 2008.05.16.02.25.41; author yamt; state Exp; branches; next 1.25.10.2; 1.25.10.2 date 2010.08.11.22.54.54; author yamt; state Exp; branches; next ; 1.24.46.1 date 2008.03.23.02.05.05; author matt; state Exp; branches; next ; 1.23.16.1 date 2006.06.21.15.10.27; author yamt; state Exp; branches; next 1.23.16.2; 1.23.16.2 date 2008.02.27.08.37.00; author yamt; state Exp; branches; next ; 1.18.2.1 date 2004.08.03.10.54.17; author skrll; state Exp; branches; next 1.18.2.2; 1.18.2.2 date 2004.09.18.14.54.16; author skrll; state Exp; branches; next 1.18.2.3; 1.18.2.3 date 2004.09.21.13.36.40; author skrll; state Exp; branches; next 1.18.2.4; 1.18.2.4 date 2005.12.11.10.29.19; author christos; state Exp; branches; next ; 1.9.2.1 date 2002.01.10.20.02.11; author thorpej; state Exp; branches; next 1.9.2.2; 1.9.2.2 date 2002.02.11.20.10.29; author jdolecek; state Exp; branches; next 1.9.2.3; 1.9.2.3 date 2002.03.16.16.02.07; author jdolecek; state Exp; branches; next 1.9.2.4; 1.9.2.4 date 2002.06.23.17.50.28; author jdolecek; state Exp; branches; next ; 1.7.2.1 date 2001.04.09.01.58.13; author nathanw; state Exp; branches; next 1.7.2.2; 1.7.2.2 date 2001.06.21.20.08.12; author nathanw; state Exp; branches; next 1.7.2.3; 1.7.2.3 date 2002.01.08.00.33.53; author nathanw; state Exp; branches; next 1.7.2.4; 1.7.2.4 date 2002.01.11.23.39.44; author nathanw; state Exp; branches; next 1.7.2.5; 1.7.2.5 date 2002.02.28.04.15.01; author nathanw; state Exp; branches; next 1.7.2.6; 1.7.2.6 date 2002.04.01.07.48.23; author nathanw; state Exp; branches; next 1.7.2.7; 1.7.2.7 date 2002.04.17.00.06.24; author nathanw; state Exp; branches; next 1.7.2.8; 1.7.2.8 date 2003.01.07.21.41.40; author thorpej; state Exp; branches; next ; 1.4.2.1 date 2000.11.20.18.10.05; author bouyer; state Exp; branches; next 1.4.2.2; 1.4.2.2 date 2001.03.27.15.32.27; author bouyer; state Exp; branches; next 1.4.2.3; 1.4.2.3 date 2001.04.21.17.46.40; author bouyer; state Exp; branches; next ; 1.2.2.1 date 99.04.04.06.57.39; author explorer; state Exp; branches 1.2.2.1.2.1; next ; 1.2.2.1.2.1 date 99.06.21.01.27.35; author thorpej; state Exp; branches; next ; desc @@ 1.36 log @Add a parameter to change keepalive interval in each PPPoE I/F @ text @/* $NetBSD: if_sppp.h,v 1.35 2021/05/11 06:42:42 yamaguchi Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Martin Husemann . * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _NET_IF_SPPP_H_ #define _NET_IF_SPPP_H_ /* ioctls used by the if_spppsubr.c driver */ #include #define SPPP_AUTHPROTO_NONE 0 #define SPPP_AUTHPROTO_PAP 1 #define SPPP_AUTHPROTO_CHAP 2 #define SPPP_AUTHPROTO_NOCHG 3 #define SPPP_AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */ /* callouts */ #define SPPP_AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */ #define SPPP_AUTHFLAG_PASSIVEAUTHPROTO 4 /* use authproto proposed by peer */ struct spppauthcfg { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int hisauth; /* one of SPPP_AUTHPROTO_* above */ u_int myauth; /* one of SPPP_AUTHPROTO_* above */ u_int myname_length; /* includes terminating 0 */ u_int mysecret_length; /* includes terminating 0 */ u_int hisname_length; /* includes terminating 0 */ u_int hissecret_length; /* includes terminating 0 */ u_int myauthflags; u_int hisauthflags; char *myname; char *mysecret; char *hisname; char *hissecret; }; #define SPPPGETAUTHCFG _IOWR('i', 120, struct spppauthcfg) #define SPPPSETAUTHCFG _IOW('i', 121, struct spppauthcfg) struct sppplcpcfg { char ifname[IFNAMSIZ]; /* pppoe interface name */ int lcp_timeout; /* LCP timeout, in ticks */ }; #define SPPPGETLCPCFG _IOWR('i', 122, struct sppplcpcfg) #define SPPPSETLCPCFG _IOW('i', 123, struct sppplcpcfg) /* * Don't change the order of this. Ordering the phases this way allows * for a comparison of ``pp_phase >= PHASE_AUTHENTICATE'' in order to * know whether LCP is up. */ #define SPPP_PHASE_DEAD 0 #define SPPP_PHASE_ESTABLISH 1 #define SPPP_PHASE_TERMINATE 2 #define SPPP_PHASE_AUTHENTICATE 3 #define SPPP_PHASE_NETWORK 4 struct spppstatus { char ifname[IFNAMSIZ]; /* pppoe interface name */ int phase; /* one of SPPP_PHASE_* above */ }; #define SPPPGETSTATUS _IOWR('i', 124, struct spppstatus) struct spppstatusncp { char ifname[IFNAMSIZ]; /* pppoe interface name */ int phase; /* one of SPPP_PHASE_* above */ int ncpup; /* != 0 if at least on NCP is up */ }; #define SPPPGETSTATUSNCP _IOWR('i', 134, struct spppstatusncp) struct spppidletimeout { char ifname[IFNAMSIZ]; /* pppoe interface name */ time_t idle_seconds; /* number of seconds idle before * disconnect, 0 to disable idle-timeout */ }; struct spppidletimeout50 { char ifname[IFNAMSIZ]; /* pppoe interface name */ uint32_t idle_seconds; /* number of seconds idle before * disconnect, 0 to disable idle-timeout */ }; #define SPPPGETIDLETO _IOWR('i', 125, struct spppidletimeout) #define SPPPSETIDLETO _IOW('i', 126, struct spppidletimeout) #define __SPPPGETIDLETO50 _IOWR('i', 125, struct spppidletimeout50) #define __SPPPSETIDLETO50 _IOW('i', 126, struct spppidletimeout50) struct spppauthfailurestats { char ifname[IFNAMSIZ]; /* pppoe interface name */ int auth_failures; /* number of LCP failures since last successful TLU */ int max_failures; /* max. allowed authorization failures */ }; #define SPPPGETAUTHFAILURES _IOWR('i', 127, struct spppauthfailurestats) struct spppauthfailuresettings { char ifname[IFNAMSIZ]; /* pppoe interface name */ int max_failures; /* max. allowed authorization failures */ }; #define SPPPSETAUTHFAILURE _IOW('i', 128, struct spppauthfailuresettings) /* set the DNS options we would like to query during PPP negotiation */ struct spppdnssettings { char ifname[IFNAMSIZ]; /* pppoe interface name */ int query_dns; /* bitmask (bits 0 and 1) for DNS options to query in IPCP */ }; #define SPPPSETDNSOPTS _IOW('i', 129, struct spppdnssettings) #define SPPPGETDNSOPTS _IOWR('i', 130, struct spppdnssettings) /* get the DNS addresses we received from the peer */ struct spppdnsaddrs { char ifname[IFNAMSIZ]; /* pppoe interface name */ uint32_t dns[2]; /* IP addresses */ }; #define SPPPGETDNSADDRS _IOWR('i', 131, struct spppdnsaddrs) /* set LCP keepalive/timeout options */ struct spppkeepalivesettings { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int maxalive; /* number of LCP echo req. w/o reply */ time_t max_noreceive; /* (sec.) grace period before we start sending LCP echo requests. */ u_int alive_interval; /* number of keepalive between echo req. */ }; struct spppkeepalivesettings50 { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int maxalive; /* number of LCP echo req. w/o reply */ uint32_t max_noreceive; /* (sec.) grace period before we start sending LCP echo requests. */ }; #define SPPPSETKEEPALIVE _IOW('i', 132, struct spppkeepalivesettings) #define SPPPGETKEEPALIVE _IOWR('i', 133, struct spppkeepalivesettings) #define __SPPPSETKEEPALIVE50 _IOW('i', 132, struct spppkeepalivesettings50) #define __SPPPGETKEEPALIVE50 _IOWR('i', 133, struct spppkeepalivesettings50) /* 134 already used! */ /* states are named and numbered according to RFC 1661 */ #define SPPP_STATE_INITIAL 0 #define SPPP_STATE_STARTING 1 #define SPPP_STATE_CLOSED 2 #define SPPP_STATE_STOPPED 3 #define SPPP_STATE_CLOSING 4 #define SPPP_STATE_STOPPING 5 #define SPPP_STATE_REQ_SENT 6 #define SPPP_STATE_ACK_RCVD 7 #define SPPP_STATE_ACK_SENT 8 #define SPPP_STATE_OPENED 9 #define SPPP_LCP_OPT_MRU __BIT(1) #define SPPP_LCP_OPT_ASYNC_MAP __BIT(2) #define SPPP_LCP_OPT_AUTH_PROTO __BIT(3) #define SPPP_LCP_OPT_QUAL_PROTO __BIT(4) #define SPPP_LCP_OPT_MAGIC __BIT(5) #define SPPP_LCP_OPT_RESERVED __BIT(6) #define SPPP_LCP_OPT_PROTO_COMP __BIT(7) #define SPPP_LCP_OPT_ADDR_COMP __BIT(8) #define SPPP_LCP_OPT_FCS_ALTS __BIT(9) #define SPPP_LCP_OPT_SELF_DESC_PAD __BIT(10) #define SPPP_LCP_OPT_CALL_BACK __BIT(13) #define SPPP_LCP_OPT_COMPOUND_FRMS __BIT(15) #define SPPP_LCP_OPT_MP_MRRU __BIT(17) #define SPPP_LCP_OPT_MP_SSNHF __BIT(18) #define SPPP_LCP_OPT_MP_EID __BIT(19) /* #define SPPP_OPT_ADDRESSES __BIT(0) */ #define SPPP_IPCP_OPT_COMPRESSION __BIT(1) #define SPPP_IPCP_OPT_ADDRESS __BIT(2) #define SPPP_IPCP_OPT_PRIMDNS __BIT(3) #define SPPP_IPCP_OPT_SECDNS __BIT(4) #define SPPP_IPV6CP_OPT_IFID __BIT(1) #define SPPP_IPV6CP_OPT_COMPRESSION __BIT(2) struct sppplcpstatus { char ifname[IFNAMSIZ]; int state; int timeout; u_long opts; u_long magic; u_long mru; }; #define SPPPGETLCPSTATUS _IOWR('i', 135, struct sppplcpstatus) struct spppipcpstatus { char ifname[IFNAMSIZ]; int state; u_long opts; u_int32_t myaddr; }; #define SPPPGETIPCPSTATUS _IOWR('i', 136, struct spppipcpstatus) struct spppipv6cpstatus { char ifname[IFNAMSIZ]; int state; u_long opts; u_int8_t my_ifid[8]; u_int8_t his_ifid[8]; }; #define SPPPGETIPV6CPSTATUS _IOWR('i', 137, struct spppipv6cpstatus) #define SPPP_NCP_IPCP __BIT(0) #define SPPP_NCP_IPV6CP __BIT(1) struct spppncpcfg { char ifname[IFNAMSIZ]; u_int ncp_flags; }; #define SPPPGETNCPCFG _IOWR('i', 138, struct spppncpcfg) #define SPPPSETNCPCFG _IOW('i', 139, struct spppncpcfg) #endif /* !_NET_IF_SPPP_H_ */ @ 1.35 log @clear authentication protocol when SPPP_AUTHPROTO_NONE is specified @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.34 2021/05/11 01:27:45 yamaguchi Exp $ */ d156 1 @ 1.34 log @Added ioctl commands for configuring NCP of pppoe(4) @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.33 2021/05/11 01:15:11 yamaguchi Exp $ */ d43 1 @ 1.33 log @Revert previous commit because of mistake of commit log back to r1.230(if_spppsubr.c) and r1.31(if_sppp.h) @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.31 2021/04/23 01:13:25 yamaguchi Exp $ */ d236 10 @ 1.32 log @Added keywords that are ipcp, noipcp, ipv6cp, noipv6cp for configuring NCP @ text @a235 10 #define SPPP_NCP_IPCP __BIT(0) #define SPPP_NCP_IPV6CP __BIT(1) struct spppncpcfg { char ifname[IFNAMSIZ]; u_int ncp_flags; }; #define SPPPGETNCPCFG _IOWR('i', 138, struct spppncpcfg) #define SPPPSETNCPCFG _IOW('i', 139, struct spppncpcfg) @ 1.31 log @Introduct a new flag to accept different authentication protocol in myauthproto and hisauthproto When the flag is enabled, a authentication protocol notified at LCP negotiation is used as my authentication protocol. When the flags is NOT enabled, my authentication protoco is not changed at LCP negotiation. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.30 2020/12/02 14:20:20 wiz Exp $ */ d236 10 @ 1.31.4.1 log @sync with head @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.36 2021/05/14 08:41:25 yamaguchi Exp $ */ a42 1 #define SPPP_AUTHPROTO_NOCHG 3 a154 1 u_int alive_interval; /* number of keepalive between echo req. */ a235 10 #define SPPP_NCP_IPCP __BIT(0) #define SPPP_NCP_IPV6CP __BIT(1) struct spppncpcfg { char ifname[IFNAMSIZ]; u_int ncp_flags; }; #define SPPPGETNCPCFG _IOWR('i', 138, struct spppncpcfg) #define SPPPSETNCPCFG _IOW('i', 139, struct spppncpcfg) @ 1.31.2.1 log @Sync with HEAD. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.35 2021/05/11 06:42:42 yamaguchi Exp $ */ a42 1 #define SPPP_AUTHPROTO_NOCHG 3 a235 10 #define SPPP_NCP_IPCP __BIT(0) #define SPPP_NCP_IPV6CP __BIT(1) struct spppncpcfg { char ifname[IFNAMSIZ]; u_int ncp_flags; }; #define SPPPGETNCPCFG _IOWR('i', 138, struct spppncpcfg) #define SPPPSETNCPCFG _IOW('i', 139, struct spppncpcfg) @ 1.31.2.2 log @Sync w/ HEAD. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.31.2.1 2021/05/13 00:47:33 thorpej Exp $ */ a155 1 u_int alive_interval; /* number of keepalive between echo req. */ @ 1.30 log @comparision -> comparison @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.29 2020/11/25 10:30:51 yamaguchi Exp $ */ d47 1 @ 1.29 log @Add commands to refer params of control protocols in if_spppsubr.c reviewed by knakahara@@n.o. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.28 2015/09/06 06:01:01 dholland Exp $ */ d77 1 a77 1 * for a comparision of ``pp_phase >= PHASE_AUTHENTICATE'' in order to @ 1.28 log @More on PR 41200: headers that declare ioctls should include sys/ioccom.h. This covers (I think) all the MI headers outside of external/ (and dist/). @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.27 2010/04/20 14:32:03 jmcneill Exp $ */ d168 67 @ 1.28.30.1 log @Sync w/ HEAD. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.30 2020/12/02 14:20:20 wiz Exp $ */ d77 1 a77 1 * for a comparison of ``pp_phase >= PHASE_AUTHENTICATE'' in order to a167 67 /* states are named and numbered according to RFC 1661 */ #define SPPP_STATE_INITIAL 0 #define SPPP_STATE_STARTING 1 #define SPPP_STATE_CLOSED 2 #define SPPP_STATE_STOPPED 3 #define SPPP_STATE_CLOSING 4 #define SPPP_STATE_STOPPING 5 #define SPPP_STATE_REQ_SENT 6 #define SPPP_STATE_ACK_RCVD 7 #define SPPP_STATE_ACK_SENT 8 #define SPPP_STATE_OPENED 9 #define SPPP_LCP_OPT_MRU __BIT(1) #define SPPP_LCP_OPT_ASYNC_MAP __BIT(2) #define SPPP_LCP_OPT_AUTH_PROTO __BIT(3) #define SPPP_LCP_OPT_QUAL_PROTO __BIT(4) #define SPPP_LCP_OPT_MAGIC __BIT(5) #define SPPP_LCP_OPT_RESERVED __BIT(6) #define SPPP_LCP_OPT_PROTO_COMP __BIT(7) #define SPPP_LCP_OPT_ADDR_COMP __BIT(8) #define SPPP_LCP_OPT_FCS_ALTS __BIT(9) #define SPPP_LCP_OPT_SELF_DESC_PAD __BIT(10) #define SPPP_LCP_OPT_CALL_BACK __BIT(13) #define SPPP_LCP_OPT_COMPOUND_FRMS __BIT(15) #define SPPP_LCP_OPT_MP_MRRU __BIT(17) #define SPPP_LCP_OPT_MP_SSNHF __BIT(18) #define SPPP_LCP_OPT_MP_EID __BIT(19) /* #define SPPP_OPT_ADDRESSES __BIT(0) */ #define SPPP_IPCP_OPT_COMPRESSION __BIT(1) #define SPPP_IPCP_OPT_ADDRESS __BIT(2) #define SPPP_IPCP_OPT_PRIMDNS __BIT(3) #define SPPP_IPCP_OPT_SECDNS __BIT(4) #define SPPP_IPV6CP_OPT_IFID __BIT(1) #define SPPP_IPV6CP_OPT_COMPRESSION __BIT(2) struct sppplcpstatus { char ifname[IFNAMSIZ]; int state; int timeout; u_long opts; u_long magic; u_long mru; }; #define SPPPGETLCPSTATUS _IOWR('i', 135, struct sppplcpstatus) struct spppipcpstatus { char ifname[IFNAMSIZ]; int state; u_long opts; u_int32_t myaddr; }; #define SPPPGETIPCPSTATUS _IOWR('i', 136, struct spppipcpstatus) struct spppipv6cpstatus { char ifname[IFNAMSIZ]; int state; u_long opts; u_int8_t my_ifid[8]; u_int8_t his_ifid[8]; }; #define SPPPGETIPV6CPSTATUS _IOWR('i', 137, struct spppipv6cpstatus) @ 1.27 log @COMPAT_50 support for SPPP[GS]ETIDLETO and SPPP[GS]ETKEEPALIVE, ok martin@@ @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.26 2008/04/28 20:24:09 martin Exp $ */ d37 3 @ 1.27.18.1 log @update from HEAD @ text @d1 1 a1 1 /* $NetBSD$ */ a36 3 #include @ 1.27.36.1 log @Sync with HEAD @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.28 2015/09/06 06:01:01 dholland Exp $ */ a36 3 #include @ 1.26 log @Remove clause 3 and 4 from TNF licenses @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.25 2008/02/20 17:05:53 matt Exp $ */ d104 6 d112 2 d152 6 d160 2 @ 1.26.22.1 log @sync with head @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.26 2008/04/28 20:24:09 martin Exp $ */ a103 6 struct spppidletimeout50 { char ifname[IFNAMSIZ]; /* pppoe interface name */ uint32_t idle_seconds; /* number of seconds idle before * disconnect, 0 to disable idle-timeout */ }; a105 2 #define __SPPPGETIDLETO50 _IOWR('i', 125, struct spppidletimeout50) #define __SPPPSETIDLETO50 _IOW('i', 126, struct spppidletimeout50) a143 6 struct spppkeepalivesettings50 { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int maxalive; /* number of LCP echo req. w/o reply */ uint32_t max_noreceive; /* (sec.) grace period before we start sending LCP echo requests. */ }; a145 2 #define __SPPPSETKEEPALIVE50 _IOW('i', 132, struct spppkeepalivesettings50) #define __SPPPGETKEEPALIVE50 _IOWR('i', 133, struct spppkeepalivesettings50) @ 1.26.20.1 log @Sync with HEAD. @ text @d1 1 a1 1 /* $NetBSD$ */ a103 6 struct spppidletimeout50 { char ifname[IFNAMSIZ]; /* pppoe interface name */ uint32_t idle_seconds; /* number of seconds idle before * disconnect, 0 to disable idle-timeout */ }; a105 2 #define __SPPPGETIDLETO50 _IOWR('i', 125, struct spppidletimeout50) #define __SPPPSETIDLETO50 _IOW('i', 126, struct spppidletimeout50) a143 6 struct spppkeepalivesettings50 { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int maxalive; /* number of LCP echo req. w/o reply */ uint32_t max_noreceive; /* (sec.) grace period before we start sending LCP echo requests. */ }; a145 2 #define __SPPPSETKEEPALIVE50 _IOW('i', 132, struct spppkeepalivesettings50) #define __SPPPGETKEEPALIVE50 _IOWR('i', 133, struct spppkeepalivesettings50) @ 1.25 log @s/u_\(int[0-9]*_t\)/u\1/g (change u_int*_t to uint*_t) @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.24 2005/12/10 23:21:38 elad Exp $ */ a17 7 * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. @ 1.25.6.1 log @Sync with HEAD. @ text @d1 1 a1 1 /* $NetBSD$ */ d18 7 @ 1.25.8.1 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.25 2008/02/20 17:05:53 matt Exp $ */ d18 7 @ 1.25.10.1 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.25 2008/02/20 17:05:53 matt Exp $ */ d18 7 @ 1.25.10.2 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.25.10.1 2008/05/16 02:25:41 yamt Exp $ */ a103 6 struct spppidletimeout50 { char ifname[IFNAMSIZ]; /* pppoe interface name */ uint32_t idle_seconds; /* number of seconds idle before * disconnect, 0 to disable idle-timeout */ }; a105 2 #define __SPPPGETIDLETO50 _IOWR('i', 125, struct spppidletimeout50) #define __SPPPSETIDLETO50 _IOW('i', 126, struct spppidletimeout50) a143 6 struct spppkeepalivesettings50 { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int maxalive; /* number of LCP echo req. w/o reply */ uint32_t max_noreceive; /* (sec.) grace period before we start sending LCP echo requests. */ }; a145 2 #define __SPPPSETKEEPALIVE50 _IOW('i', 132, struct spppkeepalivesettings50) #define __SPPPGETKEEPALIVE50 _IOWR('i', 133, struct spppkeepalivesettings50) @ 1.24 log @Multiple inclusion protection, as suggested by christos@@ on tech-kern@@ few days ago. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.23 2003/12/26 23:39:23 martin Exp $ */ d139 1 a139 1 u_int32_t dns[2]; /* IP addresses */ @ 1.24.46.1 log @sync with HEAD @ text @d1 1 a1 1 /* if_sppp.h,v 1.24 2005/12/10 23:21:38 elad Exp */ d139 1 a139 1 uint32_t dns[2]; /* IP addresses */ @ 1.23 log @Add a new ioctl SPPPGETSTATUSNCP to query the PPP phase and check wether any NCP is UP. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.22 2003/11/28 08:56:48 keihan Exp $ */ d39 3 d155 3 @ 1.23.16.1 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.23 2003/12/26 23:39:23 martin Exp $ */ a38 3 #ifndef _NET_IF_SPPP_H_ #define _NET_IF_SPPP_H_ a151 3 #endif /* !_NET_IF_SPPP_H_ */ @ 1.23.16.2 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.23.16.1 2006/06/21 15:10:27 yamt Exp $ */ d139 1 a139 1 uint32_t dns[2]; /* IP addresses */ @ 1.22 log @s/netbsd.org/NetBSD.org/g @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.21 2003/09/11 18:04:51 martin Exp $ */ d94 8 d151 1 @ 1.21 log @Fix copy & pasto (luckily, for most archs the structs had the same size, so this went unnoticed for quite some time now). Noticed by Thomas Bieg. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.20 2003/09/05 23:13:15 martin Exp $ */ d8 1 a8 1 * by Martin Husemann . @ 1.20 log @Fix copy & pasto. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.19 2003/09/03 20:48:46 martin Exp $ */ d100 2 a101 2 #define SPPPGETIDLETO _IOWR('i', 125, struct spppstatus) #define SPPPSETIDLETO _IOW('i', 126, struct spppstatus) @ 1.19 log @Rearange dead link detection slightly: As long as we receive data from the peer, don't worry. When we have not received anything within the "max_noreceive" period, we start sending LCP echo requests and count them, until we receive an answer (or some data) or the "maxalive" count of not answered echo requests is reached. All this is checked at a global 10 seconds interval for all interfaces. The "max_noreceive" period and the "maxalive" count are configurable per interface. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.18 2003/01/06 12:46:13 wiz Exp $ */ d140 2 a141 2 #define SPPPSETKEEPALIVE _IOW('i', 132, struct spppdnssettings) #define SPPPGETKEEPALIVE _IOWR('i', 133, struct spppdnssettings) @ 1.18 log @successful with only one l. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.17 2002/04/14 12:24:28 martin Exp $ */ d132 11 @ 1.18.2.1 log @Sync with HEAD @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.23 2003/12/26 23:39:23 martin Exp $ */ d8 1 a8 1 * by Martin Husemann . a93 8 struct spppstatusncp { char ifname[IFNAMSIZ]; /* pppoe interface name */ int phase; /* one of SPPP_PHASE_* above */ int ncpup; /* != 0 if at least on NCP is up */ }; #define SPPPGETSTATUSNCP _IOWR('i', 134, struct spppstatusncp) d100 2 a101 2 #define SPPPGETIDLETO _IOWR('i', 125, struct spppidletimeout) #define SPPPSETIDLETO _IOW('i', 126, struct spppidletimeout) a131 12 /* set LCP keepalive/timeout options */ struct spppkeepalivesettings { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int maxalive; /* number of LCP echo req. w/o reply */ time_t max_noreceive; /* (sec.) grace period before we start sending LCP echo requests. */ }; #define SPPPSETKEEPALIVE _IOW('i', 132, struct spppkeepalivesettings) #define SPPPGETKEEPALIVE _IOWR('i', 133, struct spppkeepalivesettings) /* 134 already used! */ @ 1.18.2.2 log @Sync with HEAD. @ text @@ 1.18.2.3 log @Fix the sync with head I botched. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.18.2.1 2004/08/03 10:54:17 skrll Exp $ */ @ 1.18.2.4 log @Sync with head. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.24 2005/12/10 23:21:38 elad Exp $ */ a38 3 #ifndef _NET_IF_SPPP_H_ #define _NET_IF_SPPP_H_ a151 3 #endif /* !_NET_IF_SPPP_H_ */ @ 1.17 log @Fix copyright notice. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.16 2002/03/02 16:23:42 martin Exp $ */ d105 1 a105 1 int auth_failures; /* number of LCP failures since last successfull TLU */ @ 1.16 log @Add support to query the peer for DNS addreses when negotiating IPCP. Add ioctls to retrieve the results. While here remove a malloc()/free() of an unused buffer. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.15 2002/01/15 12:28:08 martin Exp $ */ d3 6 a8 2 /* * Copyright (c) 2002 Martin Husemann. All rights reserved. d18 7 d26 11 a36 12 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * @ 1.15 log @Make fields in ioctl parameters that are not allowed to be negative u_ints. Better range & sanity checking for ioctl arguments (thanks, Jaromir!) @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.14 2002/01/07 10:49:02 martin Exp $ */ d106 16 @ 1.14 log @Implement a retry counter for failed authorizations and limit it to a configurable maximum (default: 5). Some ISPs shut down accounts (at least temporarily) after to many bad retries. This hit me recently due to a stupid pilot error and the fast retry rate. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.13 2002/01/06 20:14:29 martin Exp $ */ d41 8 a48 8 int hisauth; /* one of SPPP_AUTHPROTO_* above */ int myauth; /* one of SPPP_AUTHPROTO_* above */ int myname_length; /* includes terminating 0 */ int mysecret_length; /* includes terminating 0 */ int hisname_length; /* includes terminating 0 */ int hissecret_length; /* includes terminating 0 */ int myauthflags; int hisauthflags; @ 1.13 log @Implement an activity timestamp, recording the last time payload data passed through. Implement optional idle timeout. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.12 2002/01/04 12:21:25 martin Exp $ */ d92 14 @ 1.12 log @Move net/if_sppp.h to net/if_spppvar.h, create a new net/if_sppp.h containing the userland visible thinks (i.e. ioctl definitions). Remove all (both) old ioctls, as they had a brain dead API and made keeping binary compatibility more or less impossible. Replace by several new ioctls. While there, remove any arbitrary limits (resulting from the old, broken ioctls) and allow any length of names and passwords. @ text @d1 1 a1 1 /* $NetBSD$ */ d83 9 @ 1.11 log @Fix a "pointers are not permitted as case values" gcc 3.1 warning. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.10 2001/12/08 19:46:39 martin Exp $ */ d4 1 a4 1 * Defines for synchronous PPP/Cisco link level subroutines. d6 20 a25 2 * Copyright (C) 1994 Cronyx Ltd. * Author: Serge Vakulenko, a26 15 * Heavily revamped to conform to RFC 1661. * Copyright (C) 1997, Joerg Wunsch. * * This software is distributed with NO WARRANTIES, not even the implied * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * Authors grant any other persons or organizations permission to use * or modify this software as long as this message is kept with the software, * all derivative works or modified versions. * * From: Version 2.0, Fri Oct 6 20:39:21 MSK 1995 * * From: if_sppp.h,v 1.8 1997/10/11 11:25:20 joerg Exp * * From: Id: if_sppp.h,v 1.7 1998/12/01 20:20:19 hm Exp d29 1 a29 6 #ifndef _NET_IF_HDLC_H_ #define _NET_IF_HDLC_H_ 1 #include #define IDX_LCP 0 /* idx into state table */ d31 30 a60 12 struct slcp { u_long opts; /* LCP options to send (bitfield) */ u_long magic; /* local magic number */ u_long mru; /* our max receive unit */ u_long their_mru; /* their max receive unit */ u_long protos; /* bitmask of protos that are started */ u_char echoid; /* id of last keepalive echo request */ /* restart max values, see RFC 1661 */ int timeout; int max_terminate; int max_configure; int max_failure; d63 2 a64 37 #define IDX_IPCP 1 /* idx into state table */ #define IDX_IPV6CP 2 /* idx into state table */ struct sipcp { u_long opts; /* IPCP options to send (bitfield) */ u_int flags; #define IPCP_HISADDR_SEEN 1 /* have seen his address already */ #define IPCP_MYADDR_SEEN 2 /* have a local address assigned already */ #define IPCP_MYADDR_DYN 4 /* my address is dynamically assigned */ #define IPCP_HISADDR_DYN 8 /* his address is dynamically assigned */ #ifdef notdef #define IPV6CP_MYIFID_DYN 2 /* my ifid is dynamically assigned */ #endif #define IPV6CP_MYIFID_SEEN 4 /* have seen his ifid already */ u_int32_t saved_hisaddr;/* if hisaddr (IPv4) is dynamic, save original one here, in network byte order */ u_int32_t req_hisaddr; /* remote address requested */ u_int32_t req_myaddr; /* local address requested */ }; #define AUTHNAMELEN 48 #define AUTHKEYLEN 16 struct sauth { u_short proto; /* authentication protocol to use */ u_short flags; #define AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */ /* callouts */ #define AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */ u_char name[AUTHNAMELEN]; /* system identification name */ u_char secret[AUTHKEYLEN]; /* secret password */ u_char challenge[AUTHKEYLEN]; /* random challenge */ }; #define IDX_PAP 3 #define IDX_CHAP 4 #define IDX_COUNT (IDX_CHAP + 1) /* bump this when adding cp's! */ d71 9 a79 3 enum ppp_phase { PHASE_DEAD, PHASE_ESTABLISH, PHASE_TERMINATE, PHASE_AUTHENTICATE, PHASE_NETWORK d82 1 a82 110 struct sppp { /* NB: pp_if _must_ be first */ struct ifnet pp_if; /* network interface data */ struct ifqueue pp_fastq; /* fast output queue */ struct ifqueue pp_cpq; /* PPP control protocol queue */ struct sppp *pp_next; /* next interface in keepalive list */ u_int pp_flags; /* use Cisco protocol instead of PPP */ u_int pp_framebytes; /* number of bytes added by (hardware) framing */ u_short pp_alivecnt; /* keepalive packets counter */ u_short pp_loopcnt; /* loopback detection counter */ u_long pp_seq[IDX_COUNT]; /* local sequence number */ u_long pp_rseq[IDX_COUNT]; /* remote sequence number */ enum ppp_phase pp_phase; /* phase we're currently in */ int state[IDX_COUNT]; /* state machine */ u_char confid[IDX_COUNT]; /* id of last configuration request */ int rst_counter[IDX_COUNT]; /* restart counter */ int fail_counter[IDX_COUNT]; /* negotiation failure counter */ #if defined(__NetBSD__) struct callout ch[IDX_COUNT]; /* per-proto and if callouts */ struct callout pap_my_to_ch; /* PAP needs one more... */ #endif #if defined(__FreeBSD__) && __FreeBSD__ >= 3 struct callout_handle ch[IDX_COUNT]; /* per-proto and if callouts */ struct callout_handle pap_my_to_ch; /* PAP needs one more... */ #endif struct slcp lcp; /* LCP params */ struct sipcp ipcp; /* IPCP params */ struct sipcp ipv6cp; /* IPv6CP params */ struct sauth myauth; /* auth params, i'm peer */ struct sauth hisauth; /* auth params, i'm authenticator */ /* * These functions are filled in by sppp_attach(), and are * expected to be used by the lower layer (hardware) drivers * in order to communicate the (un)availability of the * communication link. Lower layer drivers that are always * ready to communicate (like hardware HDLC) can shortcut * pp_up from pp_tls, and pp_down from pp_tlf. */ void (*pp_up)(struct sppp *sp); void (*pp_down)(struct sppp *sp); /* * These functions need to be filled in by the lower layer * (hardware) drivers if they request notification from the * PPP layer whether the link is actually required. They * correspond to the tls and tlf actions. */ void (*pp_tls)(struct sppp *sp); void (*pp_tlf)(struct sppp *sp); /* * These (optional) functions may be filled by the hardware * driver if any notification of established connections * (currently: IPCP up) is desired (pp_con) or any internal * state change of the interface state machine should be * signaled for monitoring purposes (pp_chg). */ void (*pp_con)(struct sppp *sp); void (*pp_chg)(struct sppp *sp, int new_state); }; #define PP_KEEPALIVE 0x01 /* use keepalive protocol */ #define PP_CISCO 0x02 /* use Cisco protocol instead of PPP */ /* 0x04 was PP_TIMO */ #define PP_CALLIN 0x08 /* we are being called */ #define PP_NEEDAUTH 0x10 /* remote requested authentication */ #define PP_NOFRAMING 0x20 /* do not add/expect encapsulation around PPP frames (i.e. the serial HDLC like encapsulation, RFC1662) */ #define PP_MTU 1500 /* default/minimal MRU */ #define PP_MAX_MRU 2048 /* maximal MRU we want to negotiate */ /* * Definitions to pass struct sppp data down into the kernel using the * SIOC[SG]IFGENERIC ioctl interface. * * In order to use this, create a struct spppreq, fill in the cmd * field with SPPPIOGDEFS, and put the address of this structure into * the ifr_data portion of a struct ifreq. Pass this struct to a * SIOCGIFGENERIC ioctl. Then replace the cmd field by SPPPIOCDEFS, * modify the defs field as desired, and pass the struct ifreq now * to a SIOCSIFGENERIC ioctl. */ #define SPPPIOGDEFS ((('S' << 24) + (1 << 16) + sizeof(struct sppp))) #define SPPPIOSDEFS ((('S' << 24) + (2 << 16) + sizeof(struct sppp))) struct spppreq { int cmd; struct sppp defs; }; #if (defined(__FreeBSD_version) && __FreeBSD_version < 300000) || \ (defined(__FreeBSD__) && __FreeBSD__ < 3) #define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */ #define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */ #endif #if defined(KERNEL) || defined(_KERNEL) void sppp_attach (struct ifnet *ifp); void sppp_detach (struct ifnet *ifp); void sppp_input (struct ifnet *ifp, struct mbuf *m); int sppp_ioctl(struct ifnet *ifp, u_long cmd, void *data); struct mbuf *sppp_dequeue (struct ifnet *ifp); struct mbuf *sppp_pick(struct ifnet *ifp); int sppp_isempty (struct ifnet *ifp); void sppp_flush (struct ifnet *ifp); #endif #endif /* _NET_IF_HDLC_H_ */ @ 1.10 log @Change the way IPCP negotiation is handled. Collect both local and remote address and set them to the interface in one step (the peer adress was not set at all before). This causes the peer address now to show up on the interface and all messages to the routing socket to be send with correct data. The latter has been the last missing piece to complete PPPoE support. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.9 2001/04/09 19:33:01 martin Exp $ */ d179 2 a180 2 #define SPPPIOGDEFS ((caddr_t)(('S' << 24) + (1 << 16) + sizeof(struct sppp))) #define SPPPIOSDEFS ((caddr_t)(('S' << 24) + (2 << 16) + sizeof(struct sppp))) @ 1.9 log @Add another option for encapsulation: PP_NOFRAMING. In this mode, the PPP packets start with the protocol identifier and don't have any explicit framing (which may be added by the lower level driver). Make input/output statistics a little bit more correct by adding a hardware driver adjustable framing length for each packet (instead of the constant value "3" used before). While there, bump authentication name length from 32 to 48 (I have a connection where I need more than 32). XXX - this should not be artificialy limited at all. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.8 2001/03/25 19:39:20 martin Exp $ */ d54 3 a56 2 #define IPCP_MYADDR_DYN 2 /* my address is dynamically assigned */ #define IPCP_MYADDR_SEEN 4 /* have seen his address already */ d61 3 @ 1.9.2.1 log @Sync kqueue branch with -current. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.14 2002/01/07 10:49:02 martin Exp $ */ d4 1 a4 1 * Copyright (c) 2002 Martin Husemann. All rights reserved. d6 2 a7 20 * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. d9 15 d26 4 a29 1 /* ioctls used by the if_spppsubr.c driver */ d31 43 a73 30 #define SPPP_AUTHPROTO_NONE 0 #define SPPP_AUTHPROTO_PAP 1 #define SPPP_AUTHPROTO_CHAP 2 #define SPPP_AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */ /* callouts */ #define SPPP_AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */ struct spppauthcfg { char ifname[IFNAMSIZ]; /* pppoe interface name */ int hisauth; /* one of SPPP_AUTHPROTO_* above */ int myauth; /* one of SPPP_AUTHPROTO_* above */ int myname_length; /* includes terminating 0 */ int mysecret_length; /* includes terminating 0 */ int hisname_length; /* includes terminating 0 */ int hissecret_length; /* includes terminating 0 */ int myauthflags; int hisauthflags; char *myname; char *mysecret; char *hisname; char *hissecret; }; #define SPPPGETAUTHCFG _IOWR('i', 120, struct spppauthcfg) #define SPPPSETAUTHCFG _IOW('i', 121, struct spppauthcfg) struct sppplcpcfg { char ifname[IFNAMSIZ]; /* pppoe interface name */ int lcp_timeout; /* LCP timeout, in ticks */ d76 4 a79 2 #define SPPPGETLCPCFG _IOWR('i', 122, struct sppplcpcfg) #define SPPPSETLCPCFG _IOW('i', 123, struct sppplcpcfg) d86 72 a157 5 #define SPPP_PHASE_DEAD 0 #define SPPP_PHASE_ESTABLISH 1 #define SPPP_PHASE_TERMINATE 2 #define SPPP_PHASE_AUTHENTICATE 3 #define SPPP_PHASE_NETWORK 4 a158 4 struct spppstatus { char ifname[IFNAMSIZ]; /* pppoe interface name */ int phase; /* one of SPPP_PHASE_* above */ }; d160 2 a161 1 #define SPPPGETSTATUS _IOWR('i', 124, struct spppstatus) d163 11 a173 8 struct spppidletimeout { char ifname[IFNAMSIZ]; /* pppoe interface name */ time_t idle_seconds; /* number of seconds idle before * disconnect, 0 to disable idle-timeout */ }; #define SPPPGETIDLETO _IOWR('i', 125, struct spppstatus) #define SPPPSETIDLETO _IOW('i', 126, struct spppstatus) d175 2 a176 5 struct spppauthfailurestats { char ifname[IFNAMSIZ]; /* pppoe interface name */ int auth_failures; /* number of LCP failures since last successfull TLU */ int max_failures; /* max. allowed authorization failures */ }; d178 21 a198 1 #define SPPPGETAUTHFAILURES _IOWR('i', 127, struct spppauthfailurestats) d200 1 a200 5 struct spppauthfailuresettings { char ifname[IFNAMSIZ]; /* pppoe interface name */ int max_failures; /* max. allowed authorization failures */ }; #define SPPPSETAUTHFAILURE _IOW('i', 128, struct spppauthfailuresettings) @ 1.9.2.2 log @Sync w/ -current. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.9.2.1 2002/01/10 20:02:11 thorpej Exp $ */ d41 8 a48 8 u_int hisauth; /* one of SPPP_AUTHPROTO_* above */ u_int myauth; /* one of SPPP_AUTHPROTO_* above */ u_int myname_length; /* includes terminating 0 */ u_int mysecret_length; /* includes terminating 0 */ u_int hisname_length; /* includes terminating 0 */ u_int hissecret_length; /* includes terminating 0 */ u_int myauthflags; u_int hisauthflags; @ 1.9.2.3 log @Catch up with -current. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.9.2.2 2002/02/11 20:10:29 jdolecek Exp $ */ a105 16 /* set the DNS options we would like to query during PPP negotiation */ struct spppdnssettings { char ifname[IFNAMSIZ]; /* pppoe interface name */ int query_dns; /* bitmask (bits 0 and 1) for DNS options to query in IPCP */ }; #define SPPPSETDNSOPTS _IOW('i', 129, struct spppdnssettings) #define SPPPGETDNSOPTS _IOWR('i', 130, struct spppdnssettings) /* get the DNS addresses we received from the peer */ struct spppdnsaddrs { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int32_t dns[2]; /* IP addresses */ }; #define SPPPGETDNSADDRS _IOWR('i', 131, struct spppdnsaddrs) @ 1.9.2.4 log @catch up with -current on kqueue branch @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.9.2.3 2002/03/16 16:02:07 jdolecek Exp $ */ d3 2 a4 6 /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Martin Husemann . a13 7 * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. d15 12 a26 11 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. @ 1.8 log @Make the 'cmd' argument to ioctl an unsigned long, as it is everywhere else. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.7 2000/08/10 11:48:46 ad Exp $ */ d62 1 a62 1 #define AUTHNAMELEN 32 d98 1 d155 3 @ 1.7 log @Define SIOC[SG]IFGENERIC in , as FreeBSD and OpenBSD do. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.6 2000/05/02 12:43:16 itojun Exp $ */ a188 1 #if defined(__FreeBSD_version) && __FreeBSD_version >= 300003 a189 3 #else int sppp_ioctl(struct ifnet *ifp, int cmd, void *data); #endif @ 1.7.2.1 log @Catch up with -current. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.8 2001/03/25 19:39:20 martin Exp $ */ d189 1 d191 3 @ 1.7.2.2 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.7.2.1 2001/04/09 01:58:13 nathanw Exp $ */ d62 1 a62 1 #define AUTHNAMELEN 48 a97 1 u_int pp_framebytes; /* number of bytes added by (hardware) framing */ a153 3 #define PP_NOFRAMING 0x20 /* do not add/expect encapsulation around PPP frames (i.e. the serial HDLC like encapsulation, RFC1662) */ @ 1.7.2.3 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.7.2.2 2001/06/21 20:08:12 nathanw Exp $ */ d54 2 a55 3 #define IPCP_MYADDR_SEEN 2 /* have a local address assigned already */ #define IPCP_MYADDR_DYN 4 /* my address is dynamically assigned */ #define IPCP_HISADDR_DYN 8 /* his address is dynamically assigned */ a59 3 u_int32_t saved_hisaddr;/* if hisaddr (IPv4) is dynamic, save original one here, in network byte order */ u_int32_t req_hisaddr; /* remote address requested */ u_int32_t req_myaddr; /* local address requested */ d175 2 a176 2 #define SPPPIOGDEFS ((('S' << 24) + (1 << 16) + sizeof(struct sppp))) #define SPPPIOSDEFS ((('S' << 24) + (2 << 16) + sizeof(struct sppp))) @ 1.7.2.4 log @More catchup. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.7.2.3 2002/01/08 00:33:53 nathanw Exp $ */ d4 1 a4 1 * Copyright (c) 2002 Martin Husemann. All rights reserved. d6 2 a7 20 * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. d9 15 d26 4 a29 1 /* ioctls used by the if_spppsubr.c driver */ d31 47 a77 30 #define SPPP_AUTHPROTO_NONE 0 #define SPPP_AUTHPROTO_PAP 1 #define SPPP_AUTHPROTO_CHAP 2 #define SPPP_AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */ /* callouts */ #define SPPP_AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */ struct spppauthcfg { char ifname[IFNAMSIZ]; /* pppoe interface name */ int hisauth; /* one of SPPP_AUTHPROTO_* above */ int myauth; /* one of SPPP_AUTHPROTO_* above */ int myname_length; /* includes terminating 0 */ int mysecret_length; /* includes terminating 0 */ int hisname_length; /* includes terminating 0 */ int hissecret_length; /* includes terminating 0 */ int myauthflags; int hisauthflags; char *myname; char *mysecret; char *hisname; char *hissecret; }; #define SPPPGETAUTHCFG _IOWR('i', 120, struct spppauthcfg) #define SPPPSETAUTHCFG _IOW('i', 121, struct spppauthcfg) struct sppplcpcfg { char ifname[IFNAMSIZ]; /* pppoe interface name */ int lcp_timeout; /* LCP timeout, in ticks */ d80 4 a83 2 #define SPPPGETLCPCFG _IOWR('i', 122, struct sppplcpcfg) #define SPPPSETLCPCFG _IOW('i', 123, struct sppplcpcfg) d90 72 a161 5 #define SPPP_PHASE_DEAD 0 #define SPPP_PHASE_ESTABLISH 1 #define SPPP_PHASE_TERMINATE 2 #define SPPP_PHASE_AUTHENTICATE 3 #define SPPP_PHASE_NETWORK 4 a162 4 struct spppstatus { char ifname[IFNAMSIZ]; /* pppoe interface name */ int phase; /* one of SPPP_PHASE_* above */ }; d164 2 a165 1 #define SPPPGETSTATUS _IOWR('i', 124, struct spppstatus) d167 11 a177 8 struct spppidletimeout { char ifname[IFNAMSIZ]; /* pppoe interface name */ time_t idle_seconds; /* number of seconds idle before * disconnect, 0 to disable idle-timeout */ }; #define SPPPGETIDLETO _IOWR('i', 125, struct spppstatus) #define SPPPSETIDLETO _IOW('i', 126, struct spppstatus) d179 2 a180 5 struct spppauthfailurestats { char ifname[IFNAMSIZ]; /* pppoe interface name */ int auth_failures; /* number of LCP failures since last successfull TLU */ int max_failures; /* max. allowed authorization failures */ }; d182 21 a202 1 #define SPPPGETAUTHFAILURES _IOWR('i', 127, struct spppauthfailurestats) d204 1 a204 5 struct spppauthfailuresettings { char ifname[IFNAMSIZ]; /* pppoe interface name */ int max_failures; /* max. allowed authorization failures */ }; #define SPPPSETAUTHFAILURE _IOW('i', 128, struct spppauthfailuresettings) @ 1.7.2.5 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.7.2.4 2002/01/11 23:39:44 nathanw Exp $ */ d41 8 a48 8 u_int hisauth; /* one of SPPP_AUTHPROTO_* above */ u_int myauth; /* one of SPPP_AUTHPROTO_* above */ u_int myname_length; /* includes terminating 0 */ u_int mysecret_length; /* includes terminating 0 */ u_int hisname_length; /* includes terminating 0 */ u_int hissecret_length; /* includes terminating 0 */ u_int myauthflags; u_int hisauthflags; @ 1.7.2.6 log @Catch up to -current. (CVS: It's not just a program. It's an adventure!) @ text @d1 1 a1 1 /* $NetBSD$ */ a105 16 /* set the DNS options we would like to query during PPP negotiation */ struct spppdnssettings { char ifname[IFNAMSIZ]; /* pppoe interface name */ int query_dns; /* bitmask (bits 0 and 1) for DNS options to query in IPCP */ }; #define SPPPSETDNSOPTS _IOW('i', 129, struct spppdnssettings) #define SPPPGETDNSOPTS _IOWR('i', 130, struct spppdnssettings) /* get the DNS addresses we received from the peer */ struct spppdnsaddrs { char ifname[IFNAMSIZ]; /* pppoe interface name */ u_int32_t dns[2]; /* IP addresses */ }; #define SPPPGETDNSADDRS _IOWR('i', 131, struct spppdnsaddrs) @ 1.7.2.7 log @Catch up to -current. @ text @d3 2 a4 6 /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Martin Husemann . a13 7 * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. d15 12 a26 11 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. @ 1.7.2.8 log @Sync with HEAD. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.7.2.7 2002/04/17 00:06:24 nathanw Exp $ */ d105 1 a105 1 int auth_failures; /* number of LCP failures since last successful TLU */ @ 1.6 log @IPv6CP support. if IPv6 link-local address is configured to the interface, the interface tries to negotiate ifid with the other end by using IPv6CP. other changes: - do not share ppp sequence number across protocols. - if LCP proto-rej is received, drop the protocol mentioned by the message. this is to be friendly with non-IPv6 peer (if the peer complains due to lack of IPv6CP, drop IPv6CP). this basically implements "RXJ+" state transition in the RFC. - cleanup debugging message. always print blank just before message. CAVEAT: - if the peer uses the same MAC address as our side (pretty unlikely) the code may go into req-rej loop. - even though we negotiate ifid, we don't configure destination address onto the interface. it is not really necessary to do so (IMHO). - I've tested this code on a NetBSD 1.4.2 node, which was with fair amount of modifications. not sure if the committed code does it right... (please test and send reports) @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.5 2000/03/23 07:03:25 thorpej Exp $ */ d180 1 a180 2 (defined(__FreeBSD__) && __FreeBSD__ < 3) || \ defined(__NetBSD__) || defined (__OpenBSD__) @ 1.5 log @New callout mechanism with two major improvements over the old timeout()/untimeout() API: - Clients supply callout handle storage, thus eliminating problems of resource allocation. - Insertion and removal of callouts is constant time, important as this facility is used quite a lot in the kernel. The old timeout()/untimeout() API has been removed from the kernel. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.4 1999/04/04 06:57:03 explorer Exp $ */ d48 1 d56 4 d76 2 a77 2 #define IDX_PAP 2 #define IDX_CHAP 3 d100 2 a101 2 u_long pp_seq; /* local sequence number */ u_long pp_rseq; /* remote sequence number */ d117 1 @ 1.4 log @Add NetBSD rcsid tags, and preserve old ones from i4b source @ text @d1 1 a1 1 /* $NetBSD$ */ d29 2 d102 4 @ 1.4.2.1 log @Update thorpej_scsipi to -current as of a month ago @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.7 2000/08/10 11:48:46 ad Exp $ */ a28 2 #include a45 1 #define IDX_IPV6CP 2 /* idx into state table */ a52 4 #ifdef notdef #define IPV6CP_MYIFID_DYN 2 /* my ifid is dynamically assigned */ #endif #define IPV6CP_MYIFID_SEEN 4 /* have seen his ifid already */ d69 2 a70 2 #define IDX_PAP 3 #define IDX_CHAP 4 d93 2 a94 2 u_long pp_seq[IDX_COUNT]; /* local sequence number */ u_long pp_rseq[IDX_COUNT]; /* remote sequence number */ a99 4 #if defined(__NetBSD__) struct callout ch[IDX_COUNT]; /* per-proto and if callouts */ struct callout pap_my_to_ch; /* PAP needs one more... */ #endif a105 1 struct sipcp ipv6cp; /* IPv6CP params */ d168 2 a169 1 (defined(__FreeBSD__) && __FreeBSD__ < 3) @ 1.4.2.2 log @Sync with HEAD. @ text @d1 1 a1 1 /* $NetBSD$ */ d189 1 d191 3 @ 1.4.2.3 log @Sync with HEAD @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.4.2.2 2001/03/27 15:32:27 bouyer Exp $ */ d62 1 a62 1 #define AUTHNAMELEN 48 a97 1 u_int pp_framebytes; /* number of bytes added by (hardware) framing */ a153 3 #define PP_NOFRAMING 0x20 /* do not add/expect encapsulation around PPP frames (i.e. the serial HDLC like encapsulation, RFC1662) */ @ 1.3 log @switch to the i4b version of if_sppp*.[ch] (with mods) @ text @d1 2 d23 1 a23 1 * $Id: if_sppp.h,v 1.7 1998/12/01 20:20:19 hm Exp $ @ 1.2 log @put RCS ids in the right place. And yes, this is a SYNC ppp interface, used for high-speed (T1, HSSI, DS3) interfaces. @ text @a0 2 /* $NetBSD$ */ d5 4 a8 1 * Author: Serge Vakulenko, d17 5 a21 1 * Version 1.7, Wed Jun 7 22:12:02 MSD 1995 d27 2 d30 11 a40 4 u_int16_t state; /* state machine */ u_int32_t magic; /* local magic number */ u_int8_t echoid; /* id of last keepalive echo request */ u_int8_t confid; /* id of last configuration request */ d43 2 d46 34 a79 2 u_int16_t state; /* state machine */ u_int8_t confid; /* id of last configuration request */ d83 50 a132 10 struct ifnet pp_if; /* network interface data */ struct ifqueue pp_fastq; /* fast output queue */ struct sppp *pp_next; /* next interface in keepalive list */ u_int pp_flags; /* use Cisco protocol instead of PPP */ u_int16_t pp_alivecnt; /* keepalive packets counter */ u_int16_t pp_loopcnt; /* loopback detection counter */ u_int32_t pp_seq; /* local sequence number */ u_int32_t pp_rseq; /* remote sequence number */ struct slcp lcp; /* LCP params */ struct sipcp ipcp; /* IPCP params */ d137 3 a139 1 #define PP_TIMO 0x04 /* cp_timeout routine active */ a140 1 #define PP_MTU 1500 /* max. transmit unit */ d142 29 a170 9 #define LCP_STATE_CLOSED 0 /* LCP state: closed (conf-req sent) */ #define LCP_STATE_ACK_RCVD 1 /* LCP state: conf-ack received */ #define LCP_STATE_ACK_SENT 2 /* LCP state: conf-ack sent */ #define LCP_STATE_OPENED 3 /* LCP state: opened */ #define IPCP_STATE_CLOSED 0 /* IPCP state: closed (conf-req sent) */ #define IPCP_STATE_ACK_RCVD 1 /* IPCP state: conf-ack received */ #define IPCP_STATE_ACK_SENT 2 /* IPCP state: conf-ack sent */ #define IPCP_STATE_OPENED 3 /* IPCP state: opened */ d172 1 a172 2 #ifdef _KERNEL void spppattach(void); d176 5 a180 1 int sppp_ioctl (struct ifnet *ifp, int cmd, void *data); d182 1 @ 1.2.2.1 log @Pull up recent changes to if_sppp*.[ch] (i4b code) with RCS id fixes @ text @d7 1 a7 4 * Author: Serge Vakulenko, * * Heavily revamped to conform to RFC 1661. * Copyright (C) 1997, Joerg Wunsch. d16 1 a16 5 * From: Version 2.0, Fri Oct 6 20:39:21 MSK 1995 * * From: if_sppp.h,v 1.8 1997/10/11 11:25:20 joerg Exp * * From: Id: if_sppp.h,v 1.7 1998/12/01 20:20:19 hm Exp a21 2 #define IDX_LCP 0 /* idx into state table */ d23 4 a26 11 u_long opts; /* LCP options to send (bitfield) */ u_long magic; /* local magic number */ u_long mru; /* our max receive unit */ u_long their_mru; /* their max receive unit */ u_long protos; /* bitmask of protos that are started */ u_char echoid; /* id of last keepalive echo request */ /* restart max values, see RFC 1661 */ int timeout; int max_terminate; int max_configure; int max_failure; a28 2 #define IDX_IPCP 1 /* idx into state table */ d30 2 a31 34 u_long opts; /* IPCP options to send (bitfield) */ u_int flags; #define IPCP_HISADDR_SEEN 1 /* have seen his address already */ #define IPCP_MYADDR_DYN 2 /* my address is dynamically assigned */ #define IPCP_MYADDR_SEEN 4 /* have seen his address already */ }; #define AUTHNAMELEN 32 #define AUTHKEYLEN 16 struct sauth { u_short proto; /* authentication protocol to use */ u_short flags; #define AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */ /* callouts */ #define AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */ u_char name[AUTHNAMELEN]; /* system identification name */ u_char secret[AUTHKEYLEN]; /* secret password */ u_char challenge[AUTHKEYLEN]; /* random challenge */ }; #define IDX_PAP 2 #define IDX_CHAP 3 #define IDX_COUNT (IDX_CHAP + 1) /* bump this when adding cp's! */ /* * Don't change the order of this. Ordering the phases this way allows * for a comparision of ``pp_phase >= PHASE_AUTHENTICATE'' in order to * know whether LCP is up. */ enum ppp_phase { PHASE_DEAD, PHASE_ESTABLISH, PHASE_TERMINATE, PHASE_AUTHENTICATE, PHASE_NETWORK d35 10 a44 50 /* NB: pp_if _must_ be first */ struct ifnet pp_if; /* network interface data */ struct ifqueue pp_fastq; /* fast output queue */ struct ifqueue pp_cpq; /* PPP control protocol queue */ struct sppp *pp_next; /* next interface in keepalive list */ u_int pp_flags; /* use Cisco protocol instead of PPP */ u_short pp_alivecnt; /* keepalive packets counter */ u_short pp_loopcnt; /* loopback detection counter */ u_long pp_seq; /* local sequence number */ u_long pp_rseq; /* remote sequence number */ enum ppp_phase pp_phase; /* phase we're currently in */ int state[IDX_COUNT]; /* state machine */ u_char confid[IDX_COUNT]; /* id of last configuration request */ int rst_counter[IDX_COUNT]; /* restart counter */ int fail_counter[IDX_COUNT]; /* negotiation failure counter */ #if defined(__FreeBSD__) && __FreeBSD__ >= 3 struct callout_handle ch[IDX_COUNT]; /* per-proto and if callouts */ struct callout_handle pap_my_to_ch; /* PAP needs one more... */ #endif struct slcp lcp; /* LCP params */ struct sipcp ipcp; /* IPCP params */ struct sauth myauth; /* auth params, i'm peer */ struct sauth hisauth; /* auth params, i'm authenticator */ /* * These functions are filled in by sppp_attach(), and are * expected to be used by the lower layer (hardware) drivers * in order to communicate the (un)availability of the * communication link. Lower layer drivers that are always * ready to communicate (like hardware HDLC) can shortcut * pp_up from pp_tls, and pp_down from pp_tlf. */ void (*pp_up)(struct sppp *sp); void (*pp_down)(struct sppp *sp); /* * These functions need to be filled in by the lower layer * (hardware) drivers if they request notification from the * PPP layer whether the link is actually required. They * correspond to the tls and tlf actions. */ void (*pp_tls)(struct sppp *sp); void (*pp_tlf)(struct sppp *sp); /* * These (optional) functions may be filled by the hardware * driver if any notification of established connections * (currently: IPCP up) is desired (pp_con) or any internal * state change of the interface state machine should be * signaled for monitoring purposes (pp_chg). */ void (*pp_con)(struct sppp *sp); void (*pp_chg)(struct sppp *sp, int new_state); d49 1 a49 7 /* 0x04 was PP_TIMO */ #define PP_CALLIN 0x08 /* we are being called */ #define PP_NEEDAUTH 0x10 /* remote requested authentication */ #define PP_MTU 1500 /* default/minimal MRU */ #define PP_MAX_MRU 2048 /* maximal MRU we want to negotiate */ d51 1 a51 19 /* * Definitions to pass struct sppp data down into the kernel using the * SIOC[SG]IFGENERIC ioctl interface. * * In order to use this, create a struct spppreq, fill in the cmd * field with SPPPIOGDEFS, and put the address of this structure into * the ifr_data portion of a struct ifreq. Pass this struct to a * SIOCGIFGENERIC ioctl. Then replace the cmd field by SPPPIOCDEFS, * modify the defs field as desired, and pass the struct ifreq now * to a SIOCSIFGENERIC ioctl. */ #define SPPPIOGDEFS ((caddr_t)(('S' << 24) + (1 << 16) + sizeof(struct sppp))) #define SPPPIOSDEFS ((caddr_t)(('S' << 24) + (2 << 16) + sizeof(struct sppp))) struct spppreq { int cmd; struct sppp defs; }; d53 9 a61 6 #if (defined(__FreeBSD_version) && __FreeBSD_version < 300000) || \ (defined(__FreeBSD__) && __FreeBSD__ < 3) || \ defined(__NetBSD__) || defined (__OpenBSD__) #define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */ #define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */ #endif d63 2 a64 1 #if defined(KERNEL) || defined(_KERNEL) d68 1 a68 5 #if defined(__FreeBSD_version) && __FreeBSD_version >= 300003 int sppp_ioctl(struct ifnet *ifp, u_long cmd, void *data); #else int sppp_ioctl(struct ifnet *ifp, int cmd, void *data); #endif a69 1 struct mbuf *sppp_pick(struct ifnet *ifp); @ 1.2.2.1.2.1 log @Sync w/ -current. @ text @d1 1 a1 1 /* $NetBSD: if_sppp.h,v 1.4 1999/04/04 06:57:03 explorer Exp $ */ @ 1.1 log @port FreeBSD's serial ppp layer to NetBSD. The PPP part seems broken still, but the lmc driver uses the HDLC bits from here anyway. @ text @d1 2 @