Lines Matching refs:thdl

43     struct ia_tunneling_hal *thdl;  in ia_start_tunneling()  local
47 thdl = (struct ia_tunneling_hal *)malloc(sizeof(struct ia_tunneling_hal)); in ia_start_tunneling()
48 if (thdl == NULL) { in ia_start_tunneling()
54 thdl->tunnel_dev = open(TUNNELING_DEVICE, O_RDONLY); in ia_start_tunneling()
55 if (-1 == thdl->tunnel_dev) { in ia_start_tunneling()
58 free(thdl); in ia_start_tunneling()
62 return thdl; in ia_start_tunneling()
65 int ia_stop_tunneling(struct ia_tunneling_hal *thdl) in ia_stop_tunneling() argument
69 if (thdl) { in ia_stop_tunneling()
70 close(thdl->tunnel_dev); in ia_stop_tunneling()
71 thdl->tunnel_dev = 0; in ia_stop_tunneling()
72 free(thdl); in ia_stop_tunneling()
78 int ia_enable_tunneling_source(struct ia_tunneling_hal *thdl, in ia_enable_tunneling_source() argument
87 if (thdl == NULL) { in ia_enable_tunneling_source()
96 err = ioctl(thdl->tunnel_dev, TUNNEL_SETUP, &tm); in ia_enable_tunneling_source()
105 int ia_disable_tunneling_source(struct ia_tunneling_hal *thdl, in ia_disable_tunneling_source() argument
114 if (thdl == NULL) { in ia_disable_tunneling_source()
123 err = ioctl(thdl->tunnel_dev, TUNNEL_TERMINATE, &tm); in ia_disable_tunneling_source()
133 int ia_read_tunnel_data(struct ia_tunneling_hal *thdl, in ia_read_tunnel_data() argument
144 if (thdl == NULL) { in ia_read_tunnel_data()
149 read_bytes = read(thdl->tunnel_dev, buf, buf_sz); in ia_read_tunnel_data()
158 int ia_set_tunnel_out_buf_threshold(struct ia_tunneling_hal *thdl, in ia_set_tunnel_out_buf_threshold() argument
165 if (thdl == NULL) { in ia_set_tunnel_out_buf_threshold()
171 err = ioctl(thdl->tunnel_dev, TUNNEL_SET_EVENT_THRESHOLD, in ia_set_tunnel_out_buf_threshold()