Date: Tue, 06 Mar 2001 20:12:23 +0100 From: Roman Le Houelleur <roman@IPricot.com> To: freebsd-ipfw <freebsd-ipfw@FreeBSD.org> Subject: getsockopt Message-ID: <3AA53697.4B12517@IPricot.com>
next in thread | raw e-mail | index | archive | help
hi,
I would like to get some information about
a specific rule I made from a user program.
But the getsockopt () syscall always returns
information concerning the very first rule
of the chain, not the one I want.
here is the (too simple ?) code I use:
struct ip_fw rule;
int len;
bzero (&rule, sizeof (struct ip_fw));
rule.fw_number = MY_RULE_NBR;
len = sizeof (rule);
if (getsockopt (env->raw_sd, IPPROTO_IP,
IP_FW_GET,
&rule, &len) == -1)
{
perror ("getsockopt (IP_FW_GET)");
return -1;
}
I could not find precise information in the man page
(ipfw 4) and don't have much time to check the source
code in details. Though it seems to me IP_FW_GET is
made to return the entire rule chain...
thanks for any explanation,
Roman.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ipfw" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AA53697.4B12517>
