Date: Thu, 22 Oct 2009 11:32:19 -0700 From: Julian Elischer <julian@elischer.org> To: Arun Anirudhan <arun.anirudhan@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: rip_input Message-ID: <4AE0A533.1010802@elischer.org> In-Reply-To: <c668d9dd0910221101x67a8ca08p3fad9143aa84891b@mail.gmail.com> References: <c668d9dd0910221019n3156db19j8b597d2d4ae728ec@mail.gmail.com> <4AE09C03.6050201@elischer.org> <c668d9dd0910221101x67a8ca08p3fad9143aa84891b@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Arun Anirudhan wrote: > When I make > void rip_input_hook(struct mbuf *m, int off) > to > void rip_input_hook(struct mbuf *m) its showing error! the correct current definition is in sys/protosw.h 66 /* USE THESE FOR YOUR PROTOTYPES ! */ 67 typedef void pr_input_t (struct mbuf *, int); <------------- ^^^^^^^^^^^ you should use the typedef too. 68 typedef int pr_input6_t (struct mbuf **, int*, int); /* XXX FIX THIS */ 69 typedef int pr_output_t (struct mbuf *, struct socket *); 70 typedef void pr_ctlinput_t (int, struct sockaddr *, void *); 71 typedef int pr_ctloutput_t (struct socket *, struct sockopt *); 72 typedef void pr_init_t (void); 73 typedef void pr_destroy_t (void); 74 typedef void pr_fasttimo_t (void); 75 typedef void pr_slowtimo_t (void); 76 typedef void pr_drain_t (void); 77 78 struct protosw { 79 short pr_type; /* socket type used for */ 80 struct domain *pr_domain; /* domain protocol a member of */ 81 short pr_protocol; /* protocol number */ 82 short pr_flags; /* see below */ 83 /* protocol-protocol hooks */ 84 pr_input_t *pr_input; /* input to protocol (from below) */ 85 pr_output_t *pr_output; /* output to protocol (from above) */ 86 pr_ctlinput_t *pr_ctlinput; /* control input (from below) */ 87 pr_ctloutput_t *pr_ctloutput; /* control output (from above) */ 88 /* utility hooks */ 89 pr_init_t *pr_init; 90 pr_destroy_t *pr_destroy; 91 pr_fasttimo_t *pr_fasttimo; /* fast timeout (200ms) */ 92 pr_slowtimo_t *pr_slowtimo; /* slow timeout (500ms) */ 93 pr_drain_t *pr_drain; /* flush any excess space possible */ 94 95 struct pr_usrreqs *pr_usrreqs; /* user-protocol hook */ 96 };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AE0A533.1010802>