Home
last modified time | relevance | path

Searched refs:ifp (Results 1 – 25 of 34) sorted by relevance

12

/external/dhcpcd-6.8.2/
Ddhcpcd.c214 const struct interface *ifp; in dhcpcd_oneup() local
216 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in dhcpcd_oneup()
217 if (D_STATE_RUNNING(ifp) || in dhcpcd_oneup()
218 RS_STATE_RUNNING(ifp) || in dhcpcd_oneup()
219 D6_STATE_RUNNING(ifp)) in dhcpcd_oneup()
323 dhcpcd_drop(struct interface *ifp, int stop) in dhcpcd_drop() argument
326 dhcp6_drop(ifp, stop ? NULL : "EXPIRE6"); in dhcpcd_drop()
327 ipv6nd_drop(ifp); in dhcpcd_drop()
328 ipv6_drop(ifp); in dhcpcd_drop()
329 dhcp_drop(ifp, stop ? "STOP" : "EXPIRE"); in dhcpcd_drop()
[all …]
Ddhcp6.c157 dhcp6_makevendor(struct dhcp6_option *o, const struct interface *ifp) in dhcp6_makevendor() argument
168 ifo = ifp->options; in dhcp6_makevendor()
185 logger(ifp->ctx, LOG_ERR, in dhcp6_makevendor()
186 "%s: DHCPv6 Vendor Class too big", ifp->name); in dhcp6_makevendor()
298 dhcp6_updateelapsed(struct interface *ifp, struct dhcp6_message *m, size_t len) in dhcp6_updateelapsed() argument
311 state = D6_STATE(ifp); in dhcp6_updateelapsed()
321 dhcp6_newxid(const struct interface *ifp, struct dhcp6_message *m) in dhcp6_newxid() argument
325 if (ifp->options->options & DHCPCD_XID_HWADDR && in dhcp6_newxid()
326 ifp->hwlen >= sizeof(xid)) in dhcp6_newxid()
328 memcpy(&xid, (ifp->hwaddr + ifp->hwlen) - sizeof(xid), in dhcp6_newxid()
[all …]
Dif.c106 if_free(struct interface *ifp) in if_free() argument
109 if (ifp == NULL) in if_free()
111 ipv4_free(ifp); in if_free()
112 dhcp_free(ifp); in if_free()
113 dhcp6_free(ifp); in if_free()
114 ipv6nd_free(ifp); in if_free()
115 ipv6_free(ifp); in if_free()
116 free_options(ifp->options); in if_free()
117 free(ifp); in if_free()
155 if_setflag(struct interface *ifp, short flag) in if_setflag() argument
[all …]
Ddhcp.c121 static int dhcp_open(struct interface *ifp);
582 get_option_routes(struct interface *ifp, const struct dhcp_message *dhcp) in get_option_routes() argument
584 struct if_options *ifo = ifp->options; in get_option_routes()
594 p = get_option(ifp->ctx, dhcp, DHO_CSR, &len); in get_option_routes()
599 p = get_option(ifp->ctx, dhcp, DHO_MSCSR, &len); in get_option_routes()
604 routes = decode_rfc3442_rt(ifp->ctx, p, len); in get_option_routes()
608 state = D_CSTATE(ifp); in get_option_routes()
612 logger(ifp->ctx, LOG_DEBUG, in get_option_routes()
614 ifp->name, csr); in get_option_routes()
624 logger(ifp->ctx, LOG_ERR, "%s: %m", __func__); in get_option_routes()
[all …]
Dipv6nd.c228 ipv6nd_makersprobe(struct interface *ifp) in ipv6nd_makersprobe() argument
234 state = RS_STATE(ifp); in ipv6nd_makersprobe()
236 state->rslen = sizeof(*rs) + (size_t)ROUNDUP8(ifp->hwlen + 2); in ipv6nd_makersprobe()
247 nd->nd_opt_len = (uint8_t)((ROUNDUP8(ifp->hwlen + 2)) >> 3); in ipv6nd_makersprobe()
248 memcpy(nd + 1, ifp->hwaddr, ifp->hwlen); in ipv6nd_makersprobe()
255 struct interface *ifp = arg; in ipv6nd_sendrsprobe() local
262 if (ipv6_linklocal(ifp) == NULL) { in ipv6nd_sendrsprobe()
263 logger(ifp->ctx, LOG_DEBUG, in ipv6nd_sendrsprobe()
265 ifp->name); in ipv6nd_sendrsprobe()
266 ipv6_addlinklocalcallback(ifp, ipv6nd_sendrsprobe, ifp); in ipv6nd_sendrsprobe()
[all …]
Dduid.c54 duid_make(unsigned char *d, const struct interface *ifp, uint16_t type) in duid_make() argument
65 u16 = htons(ifp->family); in duid_make()
77 memcpy(p, ifp->hwaddr, ifp->hwlen); in duid_make()
78 p += ifp->hwlen; in duid_make()
84 duid_get(unsigned char *d, const struct interface *ifp) in duid_get() argument
113 logger(ifp->ctx, LOG_ERR, in duid_get()
118 if (ifp->family == ARPHRD_NETROM) { in duid_get()
119 logger(ifp->ctx, LOG_WARNING, in duid_get()
120 "%s: is a NET/ROM psuedo interface", ifp->name); in duid_get()
121 TAILQ_FOREACH(ifp2, ifp->ctx->ifaces, next) { in duid_get()
[all …]
Dipv4.c114 ipv4_iffindaddr(struct interface *ifp, in ipv4_iffindaddr() argument
120 state = IPV4_STATE(ifp); in ipv4_iffindaddr()
132 ipv4_iffindlladdr(struct interface *ifp) in ipv4_iffindlladdr() argument
137 state = IPV4_STATE(ifp); in ipv4_iffindlladdr()
150 struct interface *ifp; in ipv4_findaddr() local
153 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in ipv4_findaddr()
154 ap = ipv4_iffindaddr(ifp, addr, NULL); in ipv4_findaddr()
164 struct interface *ifp; in ipv4_addrexists() local
167 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in ipv4_addrexists()
168 state = D_STATE(ifp); in ipv4_addrexists()
[all …]
Darp.c58 arp_request(const struct interface *ifp, in_addr_t sip, in_addr_t tip, in arp_request() argument
66 ar.ar_hrd = htons(ifp->family); in arp_request()
68 ar.ar_hln = ifp->hwlen; in arp_request()
87 APPEND(ifp->hwaddr, ifp->hwlen); in arp_request()
90 APPEND(dest_hw_addr, ifp->hwlen); in arp_request()
92 ZERO(ifp->hwlen); in arp_request()
94 return if_sendrawpacket(ifp, ETHERTYPE_ARP, arp_buffer, len, in arp_request()
124 struct interface *ifp = arg; in arp_packet() local
135 state = D_STATE(ifp); in arp_packet()
139 bytes = if_readrawpacket(ifp, ETHERTYPE_ARP, in arp_packet()
[all …]
Dscript.c223 make_env(const struct interface *ifp, const char *reason, char ***argv) in make_env() argument
230 const struct if_options *ifo = ifp->options; in make_env()
243 state = D_STATE(ifp); in make_env()
247 d6_state = D6_CSTATE(ifp); in make_env()
254 else if (ipv6nd_hasra(ifp)) in make_env()
284 if (ifp->ctx->options & DHCPCD_DUMPLEASE) in make_env()
294 e = strlen("interface") + strlen(ifp->name) + 2; in make_env()
296 snprintf(env[0], e, "interface=%s", ifp->name); in make_env()
300 if (ifp->ctx->options & DHCPCD_DUMPLEASE) in make_env()
307 ifp->carrier == LINK_UNKNOWN ? "unknown" : in make_env()
[all …]
Dif-bsd.c152 if_linkaddr(struct sockaddr_dl *sdl, const struct interface *ifp) in if_linkaddr() argument
159 sdl->sdl_index = (unsigned short)ifp->index; in if_linkaddr()
221 if_getssid(struct interface *ifp) in if_getssid() argument
225 r = if_getssid1(ifp->name, ifp->ssid); in if_getssid()
227 ifp->ssid_len = (unsigned int)r; in if_getssid()
294 if_openrawsocket(struct interface *ifp, uint16_t protocol) in if_openrawsocket() argument
321 state = D_STATE(ifp); in if_openrawsocket()
328 logger(ifp->ctx, LOG_ERR, "BPF version mismatch - recompile"); in if_openrawsocket()
333 strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name)); in if_openrawsocket()
378 if_sendrawpacket(const struct interface *ifp, uint16_t protocol, in if_sendrawpacket() argument
[all …]
Dipv4ll.c76 struct interface *ifp; in ipv4ll_pick_addr() local
91 TAILQ_FOREACH(ifp, astate->iface->ctx->ifaces, next) { in ipv4ll_pick_addr()
92 state = D_CSTATE(ifp); in ipv4ll_pick_addr()
98 if (ifp == NULL) in ipv4ll_pick_addr()
208 struct interface *ifp = arg; in ipv4ll_start() local
209 struct dhcp_state *state = D_STATE(ifp); in ipv4ll_start()
223 if (sizeof(seed) > ifp->hwlen) { in ipv4ll_start()
225 memcpy(&seed, ifp->hwaddr, ifp->hwlen); in ipv4ll_start()
227 memcpy(&seed, ifp->hwaddr + ifp->hwlen - sizeof(seed), in ipv4ll_start()
232 if ((astate = arp_new(ifp, NULL)) == NULL) in ipv4ll_start()
[all …]
Dipv6.c380 const struct interface *ifp, in ipv6_makestableprivate() argument
391 ifp->hwaddr, ifp->hwlen, in ipv6_makestableprivate()
392 ifp->ssid, ifp->ssid_len, in ipv6_makestableprivate()
394 ifp->ctx->secret, ifp->ctx->secret_len); in ipv6_makestableprivate()
402 ipv6_makeaddr(struct in6_addr *addr, const struct interface *ifp, in ipv6_makeaddr() argument
413 if (ifp->options->options & DHCPCD_SLAACPRIVATE) { in ipv6_makeaddr()
414 if (ifp->ctx->secret_len == 0) { in ipv6_makeaddr()
415 if (ipv6_readsecret(ifp->ctx) == -1) in ipv6_makeaddr()
420 prefix, prefix_len, ifp, &dad) == -1) in ipv6_makeaddr()
429 if ((ap = ipv6_linklocal(ifp)) == NULL) { in ipv6_makeaddr()
[all …]
Dif-linux.c206 if_init(struct interface *ifp) in if_init() argument
218 snprintf(path, sizeof(path), PROC_PROMOTE, ifp->name); in if_init()
228 if_conf(struct interface *ifp) in if_conf() argument
234 snprintf(path, sizeof(path), SYS_LAYER2, ifp->name); in if_conf()
239 ifp->options->options |= DHCPCD_BROADCAST; in if_conf()
321 get_netlink(struct dhcpcd_ctx *ctx, struct interface *ifp, int fd, int flags, in get_netlink() argument
381 r = callback(ctx, ifp, nlm); in get_netlink()
523 link_route(struct dhcpcd_ctx *ctx, __unused struct interface *ifp, in link_route() argument
579 link_addr(struct dhcpcd_ctx *ctx, struct interface *ifp, struct nlmsghdr *nlm) in link_addr() argument
600 if ((ifp = if_findindex(ctx->ifaces, ifa->ifa_index)) == NULL) { in link_addr()
[all …]
Dipv6.h169 #define IPV6_STATE(ifp) \ argument
170 ((struct ipv6_state *)(ifp)->if_data[IF_DATA_IPV6])
171 #define IPV6_CSTATE(ifp) \ argument
172 ((const struct ipv6_state *)(ifp)->if_data[IF_DATA_IPV6])
219 const struct interface *ifp, int *dad_counter);
241 #define ipv6_linklocal(ifp) ipv6_iffindaddr((ifp), NULL) argument
245 #define ipv6_free(ifp) ipv6_freedrop((ifp), 0) argument
246 #define ipv6_drop(ifp) ipv6_freedrop((ifp), 2) argument
Difaddrs.c138 struct ifaddrs *ifp; in freeifaddrs() local
141 ifp = ifa; in freeifaddrs()
142 free(ifp->ifa_name); in freeifaddrs()
143 if (ifp->ifa_addr) in freeifaddrs()
144 free(ifp->ifa_addr); in freeifaddrs()
145 if (ifp->ifa_netmask) in freeifaddrs()
146 free(ifp->ifa_netmask); in freeifaddrs()
148 free(ifp); in freeifaddrs()
Dif.h97 int if_setflag(struct interface *ifp, short flag);
98 #define if_up(ifp) if_setflag((ifp), (IFF_UP | IFF_RUNNING)) argument
139 #define if_addaddress(ifp, addr, net, brd) \ argument
140 if_address(ifp, addr, net, brd, 1)
141 #define if_deladdress(ifp, addr, net) \ argument
142 if_address(ifp, addr, net, NULL, -1)
Ddhcp6.h207 #define D6_STATE(ifp) \ argument
208 ((struct dhcp6_state *)(ifp)->if_data[IF_DATA_DHCP6])
209 #define D6_CSTATE(ifp) \ argument
210 ((const struct dhcp6_state *)(ifp)->if_data[IF_DATA_DHCP6])
211 #define D6_STATE_RUNNING(ifp) \ argument
212 (D6_CSTATE((ifp)) && \
213 D6_CSTATE((ifp))->reason && dhcp6_dadcompleted((ifp)))
Ddhcp.h263 #define D_STATE(ifp) \ argument
264 ((struct dhcp_state *)(ifp)->if_data[IF_DATA_DHCP])
265 #define D_CSTATE(ifp) \ argument
266 ((const struct dhcp_state *)(ifp)->if_data[IF_DATA_DHCP])
267 #define D_STATE_RUNNING(ifp) \ argument
268 (D_CSTATE((ifp)) && D_CSTATE((ifp))->new && D_CSTATE((ifp))->reason)
Dipv4.h67 #define IPV4_STATE(ifp) \ argument
68 ((struct ipv4_state *)(ifp)->if_data[IF_DATA_IPV4])
69 #define IPV4_CSTATE(ifp) \ argument
70 ((const struct ipv4_state *)(ifp)->if_data[IF_DATA_IPV4])
85 int ipv4_deladdr(struct interface *ifp, const struct in_addr *,
Dif-sun.c82 if_openrawsocket(struct interface *ifp, int protocol) in if_openrawsocket() argument
90 if_sendrawpacket(const struct interface *ifp, int protocol, in if_sendrawpacket() argument
99 if_readrawpacket(struct interface *ifp, int protocol, in if_readrawpacket() argument
146 if_addrflags6(const struct in6_addr *addr, const struct interface *ifp) in if_addrflags6() argument
Drpc-stub.c50 rpc_update_ipv4(struct interface *ifp) in rpc_update_ipv4() argument
58 rpc_update_ipv6(struct interface *ifp) in rpc_update_ipv6() argument
66 rpc_notify_unicast_arp(struct interface *ifp) in rpc_notify_unicast_arp() argument
Drpc-interface.h43 int rpc_update_ipv4(struct interface *ifp);
47 int rpc_update_ipv6(struct interface *ifp);
51 int rpc_notify_unicast_arp(struct interface *ifp);
/external/libusb/libusb/
Ddescriptor.c164 struct libusb_interface_descriptor *ifp = in clear_interface() local
167 if (ifp->extra) in clear_interface()
168 free((void *) ifp->extra); in clear_interface()
169 if (ifp->endpoint) { in clear_interface()
170 for (j = 0; j < ifp->bNumEndpoints; j++) in clear_interface()
172 ifp->endpoint + j); in clear_interface()
173 free((void *) ifp->endpoint); in clear_interface()
192 struct libusb_interface_descriptor *ifp; in parse_interface() local
209 ifp = altsetting + interface->num_altsetting; in parse_interface()
211 usbi_parse_descriptor(buffer, "bbbbbbbbb", ifp, 0); in parse_interface()
[all …]
/external/dhcpcd-6.8.2/dbus/
Drpc-dbus.c295 dbus_send_message(const struct interface *ifp, const char *reason, in dbus_send_message() argument
298 const struct if_options *ifo = ifp->options; in dbus_send_message()
307 syslog(LOG_INFO, "event %s on interface %s", reason, ifp->name); in dbus_send_message()
326 e = dhcp_env(NULL, NULL, message, ifp); in dbus_send_message()
343 elen = dhcp_env(env, config_prefix, message, ifp); in dbus_send_message()
371 dbus_send_dhcpv6_message(const struct interface *ifp, const char *reason, in dbus_send_dhcpv6_message() argument
374 const struct if_options *ifo = ifp->options; in dbus_send_dhcpv6_message()
383 syslog(LOG_INFO, "event %s on interface %s", reason, ifp->name); in dbus_send_dhcpv6_message()
402 e = dhcp6_env(NULL, NULL, ifp, message, length); in dbus_send_dhcpv6_message()
419 elen = dhcp6_env(env, "new", ifp, message, length); in dbus_send_dhcpv6_message()
[all …]
/external/blktrace/
Dblkrawverify.c144 FILE *ifp, *ofp; in process() local
155 ifp = fopen(file, "r"); in process()
156 if (!ifp) in process()
166 fclose(ifp); in process()
174 while ((n = fread(bit, sizeof(struct blk_io_trace), 1, ifp)) == 1) { in process()
175 if (ferror(ifp)) { in process()
176 clearerr(ifp); in process()
199 n = fread(pdu_buf, bit->pdu_len, 1, ifp); in process()
246 if (n == 0 && !feof(ifp)) in process()
249 fclose(ifp); in process()

12