Lines Matching defs:afp

101 		const struct afswtch *afp);
102 static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl,
148 const struct afswtch *afp = NULL;
224 afp = af_getbyname(*argv);
225 if (afp == NULL) {
229 if (afp->af_name != NULL)
231 /* leave with afp non-zero */
281 afp = af_getbyname(*argv);
282 if (afp != NULL)
326 if (afp != NULL) {
328 if (!strcmp(afp->af_name, "ether")) {
336 if (ifa->ifa_addr->sa_family != afp->af_af)
350 ifconfig(argc, argv, 0, afp);
352 status(afp, sdl, ifa);
373 struct afswtch *afp;
375 for (afp = afs; afp != NULL; afp = afp->af_next)
376 if (strcmp(afp->af_name, name) == 0)
377 return afp;
384 struct afswtch *afp;
386 for (afp = afs; afp != NULL; afp = afp->af_next)
387 if (afp->af_af == af)
388 return afp;
395 struct afswtch *afp;
399 for (afp = afs; afp != NULL; afp = afp->af_next) {
400 if (afp->af_other_status == NULL)
402 if (afp->af_af != AF_UNSPEC && isset(afmask, afp->af_af))
404 afp->af_other_status(s);
405 setbit(afmask, afp->af_af);
412 struct afswtch *afp;
416 for (afp = afs; afp != NULL; afp = afp->af_next) {
417 if (afp->af_status_tunnel == NULL)
419 if (afp->af_af != AF_UNSPEC && isset(afmask, afp->af_af))
421 afp->af_status_tunnel(s);
422 setbit(afmask, afp->af_af);
487 const struct afswtch *afp, *nafp;
493 afp = NULL;
495 afp = uafp;
507 if (afp == NULL && feature_present("inet"))
508 afp = af_getbyname("inet");
511 if (afp == NULL)
512 afp = af_getbyname("link");
513 if (afp == NULL) {
519 afp->af_af == AF_LINK || afp->af_af == AF_UNSPEC ?
520 AF_LOCAL : afp->af_af;
549 if (nafp != afp) {
551 afp = nafp;
572 p->c_u.c_func(argv[1], 0, s, afp);
575 p->c_u.c_func(argv[1], 0, s, afp);
582 p->c_u.c_func2(argv[1], argv[2], s, afp);
585 p->c_u.c_func(*argv, p->c_parameter, s, afp);
593 if (afp->af_postproc != NULL)
594 afp->af_postproc(s, afp);
605 if (afp->af_ridreq == NULL || afp->af_difaddr == 0) {
607 name, afp->af_name);
613 strncpy(afp->af_ridreq, name, sizeof ifr.ifr_name);
614 ret = ioctl(s, afp->af_difaddr, afp->af_ridreq);
623 if (afp->af_addreq == NULL || afp->af_aifaddr == 0) {
625 name, afp->af_name);
630 strncpy(afp->af_addreq, name, sizeof ifr.ifr_name);
631 if (ioctl(s, afp->af_aifaddr, afp->af_addreq) < 0)
641 setifaddr(const char *addr, int param, int s, const struct afswtch *afp)
643 if (afp->af_getaddr == NULL)
651 if (doalias == 0 && afp->af_af != AF_LINK)
653 afp->af_getaddr(addr, (doalias >= 0 ? ADDR : RIDADDR));
657 settunnel(const char *src, const char *dst, int s, const struct afswtch *afp)
662 if (afp->af_settunnel == NULL) {
664 afp->af_name);
680 afp->af_settunnel(s, srcres, dstres);
688 deletetunnel(const char *vname, int param, int s, const struct afswtch *afp)
698 const struct afswtch *afp)
712 const struct afswtch *afp)
727 const struct afswtch *afp)
729 if (afp->af_getaddr != NULL) {
731 afp->af_getaddr(addr, MASK);
737 const struct afswtch *afp)
739 if (afp->af_getaddr != NULL)
740 afp->af_getaddr(addr, DSTADDR);
745 const struct afswtch *afp)
758 notealias(const char *addr, int param, int s, const struct afswtch *afp)
760 #define rqtosa(x) (&(((struct ifreq *)(afp->x))->ifr_addr))
762 if (afp->af_addreq != NULL && afp->af_ridreq != NULL)
778 const struct afswtch *afp)
780 if (afp->af_getaddr != NULL)
781 afp->af_getaddr(addr, DSTADDR);
790 setifflags(const char *vname, int value, int s, const struct afswtch *afp)
816 setifcap(const char *vname, int value, int s, const struct afswtch *afp)
838 const struct afswtch *afp)
848 const struct afswtch *afp)
858 const struct afswtch *afp)
880 const struct afswtch *afp)
905 unsetifdescr(const char *val, int value, int s, const struct afswtch *afp)
927 status(const struct afswtch *afp, const struct sockaddr_dl *sdl,
934 if (afp == NULL) {
940 afp->af_af == AF_LINK ? AF_LOCAL : afp->af_af;
999 } else if (afp->af_af == ift->ifa_addr->sa_family)
1000 afp->af_status(s, ift);
1003 if (allfamilies || afp->af_af == AF_LINK) {
1021 else if (afp->af_other_status != NULL)
1022 afp->af_other_status(s);