Give proper prototype to ddp_output.diff -r1.18 -r1.19 src/sys/netatalk/at_extern.h
(riastradh)
--- src/sys/netatalk/at_extern.h 2014/07/01 05:49:18 1.18
+++ src/sys/netatalk/at_extern.h 2016/01/20 21:59:19 1.19
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: at_extern.h,v 1.18 2014/07/01 05:49:18 rtr Exp $ */ | 1 | /* $NetBSD: at_extern.h,v 1.19 2016/01/20 21:59:19 riastradh Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1990,1994 Regents of The University of Michigan. | 4 | * Copyright (c) 1990,1994 Regents of The University of Michigan. | |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. | |
6 | * | 6 | * | |
7 | * Permission to use, copy, modify, and distribute this software and | 7 | * Permission to use, copy, modify, and distribute this software and | |
8 | * its documentation for any purpose and without fee is hereby granted, | 8 | * its documentation for any purpose and without fee is hereby granted, | |
9 | * provided that the above copyright notice appears in all copies and | 9 | * provided that the above copyright notice appears in all copies and | |
10 | * that both that copyright notice and this permission notice appear | 10 | * that both that copyright notice and this permission notice appear | |
11 | * in supporting documentation, and that the name of The University | 11 | * in supporting documentation, and that the name of The University | |
12 | * of Michigan not be used in advertising or publicity pertaining to | 12 | * of Michigan not be used in advertising or publicity pertaining to | |
13 | * distribution of the software without specific, written prior | 13 | * distribution of the software without specific, written prior | |
14 | * permission. This software is supplied as is without expressed or | 14 | * permission. This software is supplied as is without expressed or | |
@@ -27,44 +27,45 @@ | @@ -27,44 +27,45 @@ | |||
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #ifndef _NETATALK_AT_EXTERN_H_ | 29 | #ifndef _NETATALK_AT_EXTERN_H_ | |
30 | #define _NETATALK_AT_EXTERN_H_ | 30 | #define _NETATALK_AT_EXTERN_H_ | |
31 | 31 | |||
32 | struct ifnet; | 32 | struct ifnet; | |
33 | struct mbuf; | 33 | struct mbuf; | |
34 | struct sockaddr_at; | 34 | struct sockaddr_at; | |
35 | struct proc; | 35 | struct proc; | |
36 | struct ifaddr; | 36 | struct ifaddr; | |
37 | struct at_ifaddr; | 37 | struct at_ifaddr; | |
38 | struct route; | 38 | struct route; | |
39 | struct socket; | 39 | struct socket; | |
40 | struct ddpcb; | |||
40 | 41 | |||
41 | extern struct mowner atalk_rx_mowner; | 42 | extern struct mowner atalk_rx_mowner; | |
42 | extern struct mowner atalk_tx_mowner; | 43 | extern struct mowner atalk_tx_mowner; | |
43 | 44 | |||
44 | extern const struct pr_usrreqs ddp_usrreqs; | 45 | extern const struct pr_usrreqs ddp_usrreqs; | |
45 | 46 | |||
46 | void atintr(void); | 47 | void atintr(void); | |
47 | void aarpprobe(void *); | 48 | void aarpprobe(void *); | |
48 | int aarpresolve(struct ifnet *, struct mbuf *, const struct sockaddr_at *, | 49 | int aarpresolve(struct ifnet *, struct mbuf *, const struct sockaddr_at *, | |
49 | u_char *); | 50 | u_char *); | |
50 | void aarpinput(struct ifnet *, struct mbuf *); | 51 | void aarpinput(struct ifnet *, struct mbuf *); | |
51 | int at_broadcast(const struct sockaddr_at *); | 52 | int at_broadcast(const struct sockaddr_at *); | |
52 | void aarp_clean(void); | 53 | void aarp_clean(void); | |
53 | int at_control(u_long, void *, struct ifnet *); | 54 | int at_control(u_long, void *, struct ifnet *); | |
54 | int at_inithead(void **, int); | 55 | int at_inithead(void **, int); | |
55 | void at_purgeaddr(struct ifaddr *); | 56 | void at_purgeaddr(struct ifaddr *); | |
56 | void at_purgeif(struct ifnet *); | 57 | void at_purgeif(struct ifnet *); | |
57 | u_int16_t | 58 | u_int16_t | |
58 | at_cksum(struct mbuf *, int); | 59 | at_cksum(struct mbuf *, int); | |
59 | void ddp_init(void); | 60 | void ddp_init(void); | |
60 | struct ifaddr * | 61 | struct ifaddr * | |
61 | at_ifawithnet(const struct sockaddr_at *, struct ifnet *); | 62 | at_ifawithnet(const struct sockaddr_at *, struct ifnet *); | |
62 | int ddp_output(struct mbuf *, ...); | 63 | int ddp_output(struct mbuf *, struct ddpcb *); | |
63 | struct ddpcb * | 64 | struct ddpcb * | |
64 | ddp_search(struct sockaddr_at *, struct sockaddr_at *, | 65 | ddp_search(struct sockaddr_at *, struct sockaddr_at *, | |
65 | struct at_ifaddr *); | 66 | struct at_ifaddr *); | |
66 | int ddp_route(struct mbuf *, struct route *); | 67 | int ddp_route(struct mbuf *, struct route *); | |
67 | char * prsockaddr(const void *); | 68 | char * prsockaddr(const void *); | |
68 | 69 | |||
69 | 70 | |||
70 | #endif /* !_NETATALK_AT_EXTERN_H_ */ | 71 | #endif /* !_NETATALK_AT_EXTERN_H_ */ |
--- src/sys/netatalk/ddp_output.c 2013/09/12 19:47:58 1.17
+++ src/sys/netatalk/ddp_output.c 2016/01/20 21:59:19 1.18
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ddp_output.c,v 1.17 2013/09/12 19:47:58 martin Exp $ */ | 1 | /* $NetBSD: ddp_output.c,v 1.18 2016/01/20 21:59:19 riastradh Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1990,1991 Regents of The University of Michigan. | 4 | * Copyright (c) 1990,1991 Regents of The University of Michigan. | |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. | |
6 | * | 6 | * | |
7 | * Permission to use, copy, modify, and distribute this software and | 7 | * Permission to use, copy, modify, and distribute this software and | |
8 | * its documentation for any purpose and without fee is hereby granted, | 8 | * its documentation for any purpose and without fee is hereby granted, | |
9 | * provided that the above copyright notice appears in all copies and | 9 | * provided that the above copyright notice appears in all copies and | |
10 | * that both that copyright notice and this permission notice appear | 10 | * that both that copyright notice and this permission notice appear | |
11 | * in supporting documentation, and that the name of The University | 11 | * in supporting documentation, and that the name of The University | |
12 | * of Michigan not be used in advertising or publicity pertaining to | 12 | * of Michigan not be used in advertising or publicity pertaining to | |
13 | * distribution of the software without specific, written prior | 13 | * distribution of the software without specific, written prior | |
14 | * permission. This software is supplied as is without expressed or | 14 | * permission. This software is supplied as is without expressed or | |
@@ -17,60 +17,54 @@ | @@ -17,60 +17,54 @@ | |||
17 | * This product includes software developed by the University of | 17 | * This product includes software developed by the University of | |
18 | * California, Berkeley and its contributors. | 18 | * California, Berkeley and its contributors. | |
19 | * | 19 | * | |
20 | * Research Systems Unix Group | 20 | * Research Systems Unix Group | |
21 | * The University of Michigan | 21 | * The University of Michigan | |
22 | * c/o Wesley Craig | 22 | * c/o Wesley Craig | |
23 | * 535 W. William Street | 23 | * 535 W. William Street | |
24 | * Ann Arbor, Michigan | 24 | * Ann Arbor, Michigan | |
25 | * +1-313-764-2278 | 25 | * +1-313-764-2278 | |
26 | * netatalk@umich.edu | 26 | * netatalk@umich.edu | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <sys/cdefs.h> | 29 | #include <sys/cdefs.h> | |
30 | __KERNEL_RCSID(0, "$NetBSD: ddp_output.c,v 1.17 2013/09/12 19:47:58 martin Exp $"); | 30 | __KERNEL_RCSID(0, "$NetBSD: ddp_output.c,v 1.18 2016/01/20 21:59:19 riastradh Exp $"); | |
31 | 31 | |||
32 | #include <sys/param.h> | 32 | #include <sys/param.h> | |
33 | #include <sys/systm.h> | 33 | #include <sys/systm.h> | |
34 | #include <sys/mbuf.h> | 34 | #include <sys/mbuf.h> | |
35 | #include <sys/socket.h> | 35 | #include <sys/socket.h> | |
36 | #include <sys/errno.h> | 36 | #include <sys/errno.h> | |
37 | #include <sys/syslog.h> | 37 | #include <sys/syslog.h> | |
38 | 38 | |||
39 | #include <net/if.h> | 39 | #include <net/if.h> | |
40 | #include <net/route.h> | 40 | #include <net/route.h> | |
41 | #include <net/if_ether.h> | 41 | #include <net/if_ether.h> | |
42 | 42 | |||
43 | #include <netinet/in.h> | 43 | #include <netinet/in.h> | |
44 | #undef s_net | 44 | #undef s_net | |
45 | 45 | |||
46 | #include <netatalk/at.h> | 46 | #include <netatalk/at.h> | |
47 | #include <netatalk/at_var.h> | 47 | #include <netatalk/at_var.h> | |
48 | #include <netatalk/ddp.h> | 48 | #include <netatalk/ddp.h> | |
49 | #include <netatalk/ddp_var.h> | 49 | #include <netatalk/ddp_var.h> | |
50 | #include <netatalk/at_extern.h> | 50 | #include <netatalk/at_extern.h> | |
51 | 51 | |||
52 | int ddp_cksum = 1; | 52 | int ddp_cksum = 1; | |
53 | 53 | |||
54 | int | 54 | int | |
55 | ddp_output(struct mbuf *m,...) | 55 | ddp_output(struct mbuf *m, struct ddpcb *ddp) | |
56 | { | 56 | { | |
57 | struct ddpcb *ddp; | |||
58 | struct ddpehdr *deh; | 57 | struct ddpehdr *deh; | |
59 | va_list ap; | |||
60 | ||||
61 | va_start(ap, m); | |||
62 | ddp = va_arg(ap, struct ddpcb *); | |||
63 | va_end(ap); | |||
64 | 58 | |||
65 | M_PREPEND(m, sizeof(struct ddpehdr), M_DONTWAIT); | 59 | M_PREPEND(m, sizeof(struct ddpehdr), M_DONTWAIT); | |
66 | if (!m) | 60 | if (!m) | |
67 | return (ENOBUFS); | 61 | return (ENOBUFS); | |
68 | 62 | |||
69 | deh = mtod(m, struct ddpehdr *); | 63 | deh = mtod(m, struct ddpehdr *); | |
70 | deh->deh_pad = 0; | 64 | deh->deh_pad = 0; | |
71 | deh->deh_hops = 0; | 65 | deh->deh_hops = 0; | |
72 | 66 | |||
73 | deh->deh_len = m->m_pkthdr.len; | 67 | deh->deh_len = m->m_pkthdr.len; | |
74 | 68 | |||
75 | deh->deh_dnet = ddp->ddp_fsat.sat_addr.s_net; | 69 | deh->deh_dnet = ddp->ddp_fsat.sat_addr.s_net; | |
76 | deh->deh_dnode = ddp->ddp_fsat.sat_addr.s_node; | 70 | deh->deh_dnode = ddp->ddp_fsat.sat_addr.s_node; |