1/* 2 * Copyright (c) 2000-2001 Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/netsmb/smb_trantcp.c 88739 2001-12-31 17:45:16Z rwatson $ |
33 */ 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/malloc.h> 38#include <sys/mbuf.h> 39#include <sys/proc.h> 40#include <sys/protosw.h> --- 180 unchanged lines hidden (view full) --- 221} 222 223static int 224nb_connect_in(struct nbpcb *nbp, struct sockaddr_in *to, struct thread *td) 225{ 226 struct socket *so; 227 int error, s; 228 |
229 error = socreate(AF_INET, &so, SOCK_STREAM, IPPROTO_TCP, 230 td->td_proc->p_ucred, td); |
231 if (error) 232 return error; 233 nbp->nbp_tso = so; 234 so->so_upcallarg = (caddr_t)nbp; 235 so->so_upcall = nb_upcall; 236 so->so_rcv.sb_flags |= SB_UPCALL; 237 so->so_rcv.sb_timeo = (5 * hz); 238 so->so_snd.sb_timeo = (5 * hz); --- 466 unchanged lines hidden --- |