Lines Matching defs:afp

99 		const struct afswtch *afp);
100 static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl,
146 const struct afswtch *afp = NULL;
222 afp = af_getbyname(*argv);
223 if (afp == NULL) {
227 if (afp->af_name != NULL)
229 /* leave with afp non-zero */
277 afp = af_getbyname(*argv);
278 if (afp != NULL)
322 if (afp != NULL) {
324 if (!strcmp(afp->af_name, "ether")) {
332 if (ifa->ifa_addr->sa_family != afp->af_af)
346 ifconfig(argc, argv, 0, afp);
348 status(afp, sdl, ifa);
369 struct afswtch *afp;
371 for (afp = afs; afp != NULL; afp = afp->af_next)
372 if (strcmp(afp->af_name, name) == 0)
373 return afp;
380 struct afswtch *afp;
382 for (afp = afs; afp != NULL; afp = afp->af_next)
383 if (afp->af_af == af)
384 return afp;
391 struct afswtch *afp;
395 for (afp = afs; afp != NULL; afp = afp->af_next) {
396 if (afp->af_other_status == NULL)
398 if (afp->af_af != AF_UNSPEC && isset(afmask, afp->af_af))
400 afp->af_other_status(s);
401 setbit(afmask, afp->af_af);
408 struct afswtch *afp;
412 for (afp = afs; afp != NULL; afp = afp->af_next) {
413 if (afp->af_status_tunnel == NULL)
415 if (afp->af_af != AF_UNSPEC && isset(afmask, afp->af_af))
417 afp->af_status_tunnel(s);
418 setbit(afmask, afp->af_af);
483 const struct afswtch *afp, *nafp;
489 afp = NULL;
491 afp = uafp;
503 if (afp == NULL && feature_present("inet"))
504 afp = af_getbyname("inet");
507 if (afp == NULL)
508 afp = af_getbyname("link");
509 if (afp == NULL) {
515 afp->af_af == AF_LINK || afp->af_af == AF_UNSPEC ?
516 AF_LOCAL : afp->af_af;
545 if (nafp != afp) {
547 afp = nafp;
568 p->c_u.c_func(argv[1], 0, s, afp);
571 p->c_u.c_func(argv[1], 0, s, afp);
578 p->c_u.c_func2(argv[1], argv[2], s, afp);
581 p->c_u.c_func(*argv, p->c_parameter, s, afp);
589 if (afp->af_postproc != NULL)
590 afp->af_postproc(s, afp);
601 if (afp->af_ridreq == NULL || afp->af_difaddr == 0) {
603 name, afp->af_name);
609 strncpy(afp->af_ridreq, name, sizeof ifr.ifr_name);
610 ret = ioctl(s, afp->af_difaddr, afp->af_ridreq);
619 if (afp->af_addreq == NULL || afp->af_aifaddr == 0) {
621 name, afp->af_name);
626 strncpy(afp->af_addreq, name, sizeof ifr.ifr_name);
627 if (ioctl(s, afp->af_aifaddr, afp->af_addreq) < 0)
637 setifaddr(const char *addr, int param, int s, const struct afswtch *afp)
639 if (afp->af_getaddr == NULL)
647 if (doalias == 0 && afp->af_af != AF_LINK)
649 afp->af_getaddr(addr, (doalias >= 0 ? ADDR : RIDADDR));
653 settunnel(const char *src, const char *dst, int s, const struct afswtch *afp)
658 if (afp->af_settunnel == NULL) {
660 afp->af_name);
676 afp->af_settunnel(s, srcres, dstres);
684 deletetunnel(const char *vname, int param, int s, const struct afswtch *afp)
693 const struct afswtch *afp)
707 const struct afswtch *afp)
721 const struct afswtch *afp)
723 if (afp->af_getaddr != NULL) {
725 afp->af_getaddr(addr, MASK);
731 const struct afswtch *afp)
733 if (afp->af_getaddr != NULL)
734 afp->af_getaddr(addr, DSTADDR);
739 const struct afswtch *afp)
752 notealias(const char *addr, int param, int s, const struct afswtch *afp)
754 #define rqtosa(x) (&(((struct ifreq *)(afp->x))->ifr_addr))
756 if (afp->af_addreq != NULL && afp->af_ridreq != NULL)
772 const struct afswtch *afp)
774 if (afp->af_getaddr != NULL)
775 afp->af_getaddr(addr, DSTADDR);
784 setifflags(const char *vname, int value, int s, const struct afswtch *afp)
810 setifcap(const char *vname, int value, int s, const struct afswtch *afp)
832 const struct afswtch *afp)
842 const struct afswtch *afp)
852 const struct afswtch *afp)
874 const struct afswtch *afp)
899 unsetifdescr(const char *val, int value, int s, const struct afswtch *afp)
921 status(const struct afswtch *afp, const struct sockaddr_dl *sdl,
928 if (afp == NULL) {
934 afp->af_af == AF_LINK ? AF_LOCAL : afp->af_af;
993 } else if (afp->af_af == ift->ifa_addr->sa_family)
994 afp->af_status(s, ift);
997 if (allfamilies || afp->af_af == AF_LINK) {
1015 else if (afp->af_other_status != NULL)
1016 afp->af_other_status(s);