Lines Matching refs:afp

109 		const struct afswtch *afp);
110 static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl,
400 const struct afswtch *afp = NULL;
508 afp = af_getbyname(*argv);
509 if (afp == NULL) {
513 if (afp->af_name != NULL)
515 /* leave with afp non-zero */
577 afp = af_getbyname(*argv);
578 if (afp != NULL)
634 if (afp != NULL) {
636 if (!strcmp(afp->af_name, "ether")) {
645 != afp->af_af)
659 ifconfig(argc, argv, 0, afp);
661 status(afp, sdl, ifa);
751 struct afswtch *afp;
753 for (afp = afs; afp != NULL; afp = afp->af_next)
754 if (strcmp(afp->af_name, name) == 0)
755 return afp;
762 struct afswtch *afp;
764 for (afp = afs; afp != NULL; afp = afp->af_next)
765 if (afp->af_af == af)
766 return afp;
773 struct afswtch *afp;
777 for (afp = afs; afp != NULL; afp = afp->af_next) {
778 if (afp->af_other_status == NULL)
780 if (afp->af_af != AF_UNSPEC && isset(afmask, afp->af_af))
782 afp->af_other_status(s);
783 setbit(afmask, afp->af_af);
790 struct afswtch *afp;
794 for (afp = afs; afp != NULL; afp = afp->af_next) {
795 if (afp->af_status_tunnel == NULL)
797 if (afp->af_af != AF_UNSPEC && isset(afmask, afp->af_af))
799 afp->af_status_tunnel(s);
800 setbit(afmask, afp->af_af);
863 const struct afswtch *afp, *nafp;
869 afp = NULL;
871 afp = uafp;
883 if (afp == NULL && feature_present("inet"))
884 afp = af_getbyname("inet");
887 if (afp == NULL)
888 afp = af_getbyname("link");
889 if (afp == NULL) {
895 afp->af_af == AF_LINK || afp->af_af == AF_UNSPEC ?
896 AF_LOCAL : afp->af_af;
925 if (nafp != afp) {
927 afp = nafp;
947 p->c_u.c_func(argv[1], 0, s, afp);
950 p->c_u.c_func(argv[1], 0, s, afp);
957 p->c_u.c_func2(argv[1], argv[2], s, afp);
960 p->c_u.c_func(*argv, p->c_parameter, s, afp);
967 if (afp->af_postproc != NULL)
968 afp->af_postproc(s, afp);
979 if (afp->af_ridreq == NULL || afp->af_difaddr == 0) {
981 name, afp->af_name);
987 strlcpy(((struct ifreq *)afp->af_ridreq)->ifr_name, name,
989 ret = ioctl(s, afp->af_difaddr, afp->af_ridreq);
998 if (afp->af_addreq == NULL || afp->af_aifaddr == 0) {
1000 name, afp->af_name);
1005 strlcpy(((struct ifreq *)afp->af_addreq)->ifr_name, name,
1007 if (ioctl(s, afp->af_aifaddr, afp->af_addreq) < 0)
1017 setifaddr(const char *addr, int param, int s, const struct afswtch *afp)
1019 if (afp->af_getaddr == NULL)
1027 if (doalias == 0 && afp->af_af != AF_LINK)
1029 afp->af_getaddr(addr, (doalias >= 0 ? ADDR : RIDADDR));
1033 settunnel(const char *src, const char *dst, int s, const struct afswtch *afp)
1038 if (afp->af_settunnel == NULL) {
1040 afp->af_name);
1056 afp->af_settunnel(s, srcres, dstres);
1064 deletetunnel(const char *vname, int param, int s, const struct afswtch *afp)
1074 const struct afswtch *afp)
1088 const struct afswtch *afp)
1103 const struct afswtch *afp)
1105 if (afp->af_getaddr != NULL) {
1107 afp->af_getaddr(addr, MASK);
1113 const struct afswtch *afp)
1115 if (afp->af_getaddr != NULL)
1116 afp->af_getaddr(addr, DSTADDR);
1120 notealias(const char *addr, int param, int s, const struct afswtch *afp)
1122 #define rqtosa(x) (&(((struct ifreq *)(afp->x))->ifr_addr))
1124 if (afp->af_addreq != NULL && afp->af_ridreq != NULL)
1140 const struct afswtch *afp)
1142 if (afp->af_getaddr != NULL)
1143 afp->af_getaddr(addr, DSTADDR);
1152 setifflags(const char *vname, int value, int s, const struct afswtch *afp)
1178 setifcap(const char *vname, int value, int s, const struct afswtch *afp)
1200 const struct afswtch *afp)
1210 const struct afswtch *afp)
1219 setifpcp(const char *val, int arg __unused, int s, const struct afswtch *afp)
1236 const struct afswtch *afp)
1246 const struct afswtch *afp)
1268 const struct afswtch *afp)
1295 unsetifdescr(const char *val, int value, int s, const struct afswtch *afp)
1317 status(const struct afswtch *afp, const struct sockaddr_dl *sdl,
1324 if (afp == NULL) {
1330 afp->af_af == AF_LINK ? AF_LOCAL : afp->af_af;
1389 } else if (afp->af_af == ift->ifa_addr->sa_family)
1390 afp->af_status(s, ift);
1393 if (allfamilies || afp->af_af == AF_LINK) {
1411 else if (afp->af_other_status != NULL)
1412 afp->af_other_status(s);