Lines Matching defs:common
12 #include "common.h"
48 struct driver_wired_common_data common;
176 drv->common.sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_PAE));
177 if (drv->common.sock < 0) {
183 if (eloop_register_read_sock(drv->common.sock, handle_read,
184 drv->common.ctx, NULL)) {
190 os_strlcpy(ifr.ifr_name, drv->common.ifname, sizeof(ifr.ifr_name));
191 if (ioctl(drv->common.sock, SIOCGIFINDEX, &ifr) != 0) {
203 if (bind(drv->common.sock, (struct sockaddr *) &addr, sizeof(addr)) < 0)
210 if (wired_multicast_membership(drv->common.sock, ifr.ifr_ifindex,
218 os_strlcpy(ifr.ifr_name, drv->common.ifname, sizeof(ifr.ifr_name));
219 if (ioctl(drv->common.sock, SIOCGIFHWADDR, &ifr) != 0) {
240 drv->common.ctx, NULL)) {
264 os_strlcpy(ifr.ifr_ifrn.ifrn_name, drv->common.ifname, IFNAMSIZ);
313 res = send(drv->common.sock, (u8 *) hdr, len, 0);
338 drv->common.ctx = hapd;
339 os_strlcpy(drv->common.ifname, params->ifname,
340 sizeof(drv->common.ifname));
356 if (drv->common.sock >= 0) {
357 eloop_unregister_read_sock(drv->common.sock);
358 close(drv->common.sock);
378 if (driver_wired_init_common(&drv->common, ifname, ctx) < 0) {
391 driver_wired_deinit_common(&drv->common);