ddp_pcb.c (111119) | ddp_pcb.c (111888) |
---|---|
1/* 2 * Copyright (c) 1990,1994 Regents of The University of Michigan. 3 * All Rights Reserved. See COPYRIGHT. 4 * | 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_pcb.c 111119 2003-02-19 05:47:46Z imp $ | 5 * $FreeBSD: head/sys/netatalk/ddp_pcb.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> | 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> | 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 | 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; |
|
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 | 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 |
545 | |
546void | 546void |
547ddp_init(void ) | 547ddp_init(void) |
548{ | 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); | 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); |
555} 556 557#if 0 558static void 559ddp_clean(void ) 560{ 561 struct ddpcb *ddp; 562 --- 28 unchanged lines hidden --- | 559} 560 561#if 0 562static void 563ddp_clean(void ) 564{ 565 struct ddpcb *ddp; 566 --- 28 unchanged lines hidden --- |