rip_input
Julian Elischer
julian at elischer.org
Thu Oct 22 18:32:20 UTC 2009
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 };
More information about the freebsd-net
mailing list