Lines Matching refs:pri

22 	struct tuntap_data *pri = data;  in tuntap_user_init()  local
24 pri->dev = dev; in tuntap_user_init()
31 struct tuntap_data *pri = data; in tuntap_add_addr() local
33 tap_check_ips(pri->gate_addr, addr); in tuntap_add_addr()
34 if ((pri->fd == -1) || pri->fixed_config) in tuntap_add_addr()
36 open_addr(addr, netmask, pri->dev_name); in tuntap_add_addr()
42 struct tuntap_data *pri = data; in tuntap_del_addr() local
44 if ((pri->fd == -1) || pri->fixed_config) in tuntap_del_addr()
46 close_addr(addr, netmask, pri->dev_name); in tuntap_del_addr()
131 struct tuntap_data *pri = data; in tuntap_open() local
135 err = tap_open_common(pri->dev, pri->gate_addr); in tuntap_open()
139 if (pri->fixed_config) { in tuntap_open()
140 pri->fd = os_open_file("/dev/net/tun", in tuntap_open()
142 if (pri->fd < 0) { in tuntap_open()
144 "err = %d\n", -pri->fd); in tuntap_open()
145 return pri->fd; in tuntap_open()
149 strscpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name)); in tuntap_open()
150 if (ioctl(pri->fd, TUNSETIFF, &ifr) < 0) { in tuntap_open()
154 close(pri->fd); in tuntap_open()
172 err = tuntap_open_tramp(pri->gate_addr, &pri->fd, fds[0], in tuntap_open()
184 pri->dev_name = uml_strdup(buffer); in tuntap_open()
190 iter_addresses(pri->dev, open_addr, pri->dev_name); in tuntap_open()
193 return pri->fd; in tuntap_open()
198 struct tuntap_data *pri = data; in tuntap_close() local
200 if (!pri->fixed_config) in tuntap_close()
201 iter_addresses(pri->dev, close_addr, pri->dev_name); in tuntap_close()
203 pri->fd = -1; in tuntap_close()