Lines Matching +full:3 +full:at
46 struct mibarp *at; in mib_find_arp() local
52 TAILQ_FOREACH(at, &mibarp_list, link) in mib_find_arp()
53 if (at->index.subs[0] == ifp->index && in mib_find_arp()
54 (at->index.subs[1] == ((a >> 24) & 0xff)) && in mib_find_arp()
55 (at->index.subs[2] == ((a >> 16) & 0xff)) && in mib_find_arp()
56 (at->index.subs[3] == ((a >> 8) & 0xff)) && in mib_find_arp()
57 (at->index.subs[4] == ((a >> 0) & 0xff))) in mib_find_arp()
58 return (at); in mib_find_arp()
66 struct mibarp *at; in mib_arp_create() local
69 if ((at = malloc(sizeof(*at))) == NULL) in mib_arp_create()
71 at->flags = 0; in mib_arp_create()
73 at->index.len = 5; in mib_arp_create()
74 at->index.subs[0] = ifp->index; in mib_arp_create()
75 at->index.subs[1] = (a >> 24) & 0xff; in mib_arp_create()
76 at->index.subs[2] = (a >> 16) & 0xff; in mib_arp_create()
77 at->index.subs[3] = (a >> 8) & 0xff; in mib_arp_create()
78 at->index.subs[4] = (a >> 0) & 0xff; in mib_arp_create()
79 if ((at->physlen = physlen) > sizeof(at->phys)) in mib_arp_create()
80 at->physlen = sizeof(at->phys); in mib_arp_create()
81 memcpy(at->phys, phys, at->physlen); in mib_arp_create()
83 INSERT_OBJECT_OID(at, &mibarp_list); in mib_arp_create()
85 return (at); in mib_arp_create()
89 mib_arp_delete(struct mibarp *at) in mib_arp_delete() argument
91 TAILQ_REMOVE(&mibarp_list, at, link); in mib_arp_delete()
92 free(at); in mib_arp_delete()
99 struct mibarp *at; in op_nettomedia() local
101 at = NULL; /* gcc */ in op_nettomedia()
109 if ((at = NEXT_OBJECT_OID(&mibarp_list, &value->var, sub)) == NULL) in op_nettomedia()
111 index_append(&value->var, sub, &at->index); in op_nettomedia()
115 if ((at = FIND_OBJECT_OID(&mibarp_list, &value->var, sub)) == NULL) in op_nettomedia()
120 if ((at = FIND_OBJECT_OID(&mibarp_list, &value->var, sub)) == NULL) in op_nettomedia()
132 value->v.integer = at->index.subs[0]; in op_nettomedia()
136 return (string_get(value, at->phys, at->physlen)); in op_nettomedia()
139 value->v.ipaddress[0] = at->index.subs[1]; in op_nettomedia()
140 value->v.ipaddress[1] = at->index.subs[2]; in op_nettomedia()
141 value->v.ipaddress[2] = at->index.subs[3]; in op_nettomedia()
142 value->v.ipaddress[3] = at->index.subs[4]; in op_nettomedia()
146 value->v.integer = (at->flags & MIBARP_PERM) ? 4 : 3; in op_nettomedia()