Deleted Added
sdiff udiff text old ( 111119 ) new ( 111888 )
full compact
1/*
2 * Copyright (c) 1990,1994 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
4 *
5 * $FreeBSD: head/sys/netatalk/ddp_usrreq.c 111119 2003-02-19 05:47:46Z imp $
6 */
7
8#include <sys/param.h>
9#include <sys/systm.h>
10#include <sys/malloc.h>
11#include <sys/mbuf.h>
12#include <sys/socket.h>
13#include <sys/socketvar.h>
14#include <sys/protosw.h>
15#include <net/if.h>
16#include <net/route.h>
17#include <net/intrq.h>
18
19#include <netatalk/at.h>
20#include <netatalk/at_var.h>
21#include <netatalk/ddp_var.h>
22#include <netatalk/at_extern.h>
23
24static void at_pcbdisconnect( struct ddpcb *ddp );
25static void at_sockaddr(struct ddpcb *ddp, struct sockaddr **addr);

--- 4 unchanged lines hidden (view full) ---

30static void at_pcbdetach(struct socket *so, struct ddpcb *ddp);
31static int at_pcballoc(struct socket *so);
32
33struct ddpcb *ddp_ports[ ATPORT_LAST ];
34struct ddpcb *ddpcb = NULL;
35static u_long ddp_sendspace = DDP_MAXSZ; /* Max ddp size + 1 (ddp_type) */
36static u_long ddp_recvspace = 10 * ( 587 + sizeof( struct sockaddr_at ));
37
38
39static int
40ddp_attach(struct socket *so, int proto, struct thread *td)
41{
42 struct ddpcb *ddp;
43 int error = 0;
44 int s;
45

--- 491 unchanged lines hidden (view full) ---

537 ddp = sotoddpcb( so );
538 if ( ddp == NULL ) {
539 return( EINVAL);
540 }
541 at_sockaddr( ddp, nam );
542 return(0);
543}
544
545
546void
547ddp_init(void )
548{
549 atintrq1.ifq_maxlen = IFQ_MAXLEN;
550 atintrq2.ifq_maxlen = IFQ_MAXLEN;
551 atintrq1_present = 1;
552 atintrq2_present = 1;
553 mtx_init(&atintrq1.ifq_mtx, "at1_inq", NULL, MTX_DEF);
554 mtx_init(&atintrq2.ifq_mtx, "at2_inq", NULL, MTX_DEF);
555}
556
557#if 0
558static void
559ddp_clean(void )
560{
561 struct ddpcb *ddp;
562

--- 28 unchanged lines hidden ---