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 111888 2003-03-04 23:19:55Z jlemon $
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/netisr.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
38static struct ifqueue atintrq1, atintrq2, aarpintrq;
39
40static int
41ddp_attach(struct socket *so, int proto, struct thread *td)
42{
43 struct ddpcb *ddp;
44 int error = 0;
45 int s;
46

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

538 ddp = sotoddpcb( so );
539 if ( ddp == NULL ) {
540 return( EINVAL);
541 }
542 at_sockaddr( ddp, nam );
543 return(0);
544}
545
546void
547ddp_init(void)
548{
549
550 atintrq1.ifq_maxlen = IFQ_MAXLEN;
551 atintrq2.ifq_maxlen = IFQ_MAXLEN;
552 aarpintrq.ifq_maxlen = IFQ_MAXLEN;
553 mtx_init(&atintrq1.ifq_mtx, "at1_inq", NULL, MTX_DEF);
554 mtx_init(&atintrq2.ifq_mtx, "at2_inq", NULL, MTX_DEF);
555 mtx_init(&aarpintrq.ifq_mtx, "aarp_inq", NULL, MTX_DEF);
556 netisr_register(NETISR_ATALK1, at1intr, &atintrq1);
557 netisr_register(NETISR_ATALK2, at2intr, &atintrq2);
558 netisr_register(NETISR_AARP, aarpintr, &aarpintrq);
559}
560
561#if 0
562static void
563ddp_clean(void )
564{
565 struct ddpcb *ddp;
566

--- 28 unchanged lines hidden ---