Lines Matching refs:fd
81 smb_setopt_int(int fd, int level, int name, int val)
104 if (t_optmgmt(fd, &oreq, &ores) < 0) {
120 smb_setopts(int fd)
133 err = smb_setopt_int(fd, SOL_SOCKET, SO_SNDBUF, smb_tcpsndbuf);
138 err = smb_setopt_int(fd, SOL_SOCKET, SO_RCVBUF, smb_tcprcvbuf);
143 err = smb_setopt_int(fd, SOL_SOCKET, SO_KEEPALIVE, 1);
148 err = smb_setopt_int(fd, IPPROTO_TCP, TCP_NODELAY, 1);
154 err = smb_setopt_int(fd, IPPROTO_TCP,
171 int fd, err;
184 fd = t_open(dev, O_RDWR, NULL);
185 if (fd < 0) {
191 if ((err = smb_setopts(fd)) != 0)
193 if (t_bind(fd, NULL, NULL) < 0) {
206 if (t_connect(fd, &sndcall, NULL) < 0) {
207 err = get_xti_err(fd);
212 DPRINT("tcp6: connected, fd=%d", fd);
213 ctx->ct_tran_fd = fd;
217 close(fd);
232 int fd, err;
245 fd = t_open(dev, O_RDWR, NULL);
246 if (fd < 0) {
252 if ((err = smb_setopts(fd)) != 0)
254 if (t_bind(fd, NULL, NULL) < 0) {
267 if (t_connect(fd, &sndcall, NULL) < 0) {
268 err = get_xti_err(fd);
273 DPRINT("tcp4: connected, fd=%d", fd);
274 ctx->ct_tran_fd = fd;
278 close(fd);