IP Filter - ioctl

Hi all,

I would like to know something ioctl functions to provide some functionality to IP filter. I dont know how to use the ictl function (e.g. SIOCADAFR) to add rule to the kernel memory of IP Filter. I correctly used SIOCGETFS or SIOCSWAPA but If I want to change something it will always return an EINVAL error message (invalid argument). I am using a Solaris SunOS tc2013 5.10 Generic_118833-17 sun4u sparc SUNW,Ultra-80 and version of IP Filter is 4.0.3. Please can you send me more documnetation for ioctl function or same working examples to add, insert and remove rules.

Thanks a lot Petr

[618 byte] By [petr_m] at [2007-11-26 11:00:13]
# 1

I already found a bug. The structure frentryt has to be filled with a parameter fr_v of IP version. It may be 4 or 6. Now ioctl returns 0. But the next problem is when I am trying to add more than one rule. It is possible to add more rules by one call of ioctl function? If I fill the structure frentry and its member fr_next with the pointer to the next rule calling ioctl will reset server. I dont know where is the bug. So If you can help I will be so glad. Thanks P.

petr_m at 2007-7-7 3:13:50 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...