Date: Mon, 1 Jun 2015 16:22:43 +0200 From: Luigi Rizzo <rizzo@iet.unipi.it> To: samira <nazari.s11@gmail.com> Cc: "freebsd-ipfw@freebsd.org" <freebsd-ipfw@freebsd.org> Subject: Re: chnage source of IPFW Message-ID: <CA%2BhQ2%2Bi3Mj35_FFD9M2PVh7pZ5%2B-%2BCnCs8Xo6dtf8-0YW1Vr1g@mail.gmail.com> In-Reply-To: <1433151867517-6015918.post@n5.nabble.com> References: <1433151867517-6015918.post@n5.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 1, 2015 at 11:44 AM, samira <nazari.s11@gmail.com> wrote: > Hello every one, > I want to add a parameter in commands for ipfw, like " ipfw add allow ud= p > from any to any *udpdatalen 10 * ". > =E2=80=8Badding commands is doable but it requires you to touch multiple parts of the code, namely: - the parsing function in userspace - the decoding function in userspace - the validate function in the kernel (typically one case in a large switch() statement) - the function implementation in the kernel (one case in another, even bigger switch statement) For things like "udpdatalen X" you might be better off doing something like " ... udp iplen X+20 ..." cheers luigi =E2=80=8B > > I changes in /usr/src/sbin/ipfw/ipfw2.c like tcpdatalen option and now i > have udpdatalen command correctly in cli, but when i add argument(10) thi= s > error occurred. > " *ipfw: getsockopt(IP_FW_ADD): Invalid argument* " > > also I define variables in /usr/src/sys/netinet/ip_fw.h and change .c fil= es > in /usr/src/sys/net pfil/ and build kernel and did not changed that error= . > > Thank you for all of your comments and help. > > > > > > > > -- > View this message in context: > http://freebsd.1045724.n5.nabble.com/chnage-source-of-IPFW-tp6015918.html > Sent from the freebsd-ipfw mailing list archive at Nabble.com. > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" > --=20 -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2217533 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2Bi3Mj35_FFD9M2PVh7pZ5%2B-%2BCnCs8Xo6dtf8-0YW1Vr1g>