Here are my diffs to make IPFilter 4.1.15 function on Tru64. It would be good to learn whether this works for others too.
This is my build system: # uname -a OSF1 hostname.domain V5.1 2650 alpha Firstly, a word of caution; I have not attempted to fully understand the impact of my changes. Whilst I'm building on Tru64 for now, this is only for my test purpose, as I am using it as a stepping stone to port IPFilter to HP OpenVMS. I've only carried out very basic testing... who knows what I may have broken. Having said that... The changes I made are very small. They fell into two basic areas: 1) Fixup inclusion of radix_ipf.h 2) Dummy out the use of the 'curproc' global 1) Fixup inclusion of radix_ipf.h --------------------------------- The __osf__ build generates radix_ipf_local.h from radix_ipf.h. It merely changes the name of the structures, presumably to resolve some name clashes with the radix_node structure, which generally comes from <net/radix.h>. However, the __osf__ build would sometimes pick up the <net/radix.h> include file, which caused clashes. I have removed the dependency on "radix_ipf_local.h" so now it compiles with then standard "radix_ipf.h". Wherever it was picking up <net/radix.h> I forced it to use "radix_ipf.h". I'm not certain why "radix_ipf_local.h" was invented, but suspect it had to do with _KERNEL builds?? Even so, I was still left with a few unanswered concerns. Maybe "radix_ipf_local.h" can be retired altogether on __osf__? 2) Dummy out the use of the 'curproc' global -------------------------------------------- Tru64 does not declare the 'curproc' global. I also could not fully understand the changes to the ioctl() processing to make use of the uid, when previously it did not need it. Perhaps this is an OpenSolaris thing? As such, I simply forced the uid to be zero wherever curproc->p_uid was used. My edit is a hack, since I don't know why uid was introduced, and would appreciate an explanation of the modified ioctl() design center. Finally... here are my diffs. [BTW: I did not attempt to weed out the remaining compilation Warnings or Informationals.] # diff ip_fil.wip2 ip_fil4.1.15 Common subdirectories: ip_fil.wip2/4bsd and ip_fil4.1.15/4bsd Common subdirectories: ip_fil.wip2/AIX and ip_fil4.1.15/AIX Common subdirectories: ip_fil.wip2/BSD and ip_fil4.1.15/BSD Common subdirectories: ip_fil.wip2/BSDOS and ip_fil4.1.15/BSDOS Common subdirectories: ip_fil.wip2/BSDOS3 and ip_fil4.1.15/BSDOS3 Common subdirectories: ip_fil.wip2/BSDOS4 and ip_fil4.1.15/BSDOS4 Common subdirectories: ip_fil.wip2/FWTK and ip_fil4.1.15/FWTK Common subdirectories: ip_fil.wip2/FreeBSD and ip_fil4.1.15/FreeBSD Common subdirectories: ip_fil.wip2/FreeBSD-2.2 and ip_fil4.1.15/FreeBSD-2.2 Common subdirectories: ip_fil.wip2/FreeBSD-3 and ip_fil4.1.15/FreeBSD-3 Common subdirectories: ip_fil.wip2/FreeBSD-4.0 and ip_fil4.1.15/FreeBSD-4.0 Common subdirectories: ip_fil.wip2/HPUX and ip_fil4.1.15/HPUX Common subdirectories: ip_fil.wip2/IRIX and ip_fil4.1.15/IRIX Common subdirectories: ip_fil.wip2/Linux and ip_fil4.1.15/Linux Common subdirectories: ip_fil.wip2/NetBSD and ip_fil4.1.15/NetBSD Common subdirectories: ip_fil.wip2/NetBSD-1.2 and ip_fil4.1.15/NetBSD-1.2 Common subdirectories: ip_fil.wip2/OSF and ip_fil4.1.15/OSF Common subdirectories: ip_fil.wip2/OpenBSD and ip_fil4.1.15/OpenBSD Common subdirectories: ip_fil.wip2/OpenBSD-2 and ip_fil4.1.15/OpenBSD-2 Common subdirectories: ip_fil.wip2/OpenBSD-3 and ip_fil4.1.15/OpenBSD-3 Common subdirectories: ip_fil.wip2/SunOS4 and ip_fil4.1.15/SunOS4 Common subdirectories: ip_fil.wip2/SunOS5 and ip_fil4.1.15/SunOS5 Common subdirectories: ip_fil.wip2/etc and ip_fil4.1.15/etc diff ip_fil.wip2/fil.c ip_fil4.1.15/fil.c 83c83 < #if !defined(_KERNEL) && (defined(__FreeBSD__) || defined(__osf__)) /* MJM: 24-Nov-2006 */ --- > #if !defined(_KERNEL) && defined(__FreeBSD__) diff ip_fil.wip2/ip_fil.c ip_fil4.1.15/ip_fil.c 83c83 < #if !defined(_KERNEL) && (defined(__FreeBSD__) || defined(__osf__)) /* MJM: 24-Nov-2006 */ --- > #if defined(__FreeBSD__) 101c101 < #if (defined(_KERNEL) && defined(__osf__)) || defined(__hpux) || defined(__sgi) /* MJM: 27-Nov-2006 */ --- > #if defined(__osf__) || defined(__hpux) || defined(__sgi) diff ip_fil.wip2/ip_fil.h ip_fil4.1.15/ip_fil.h 1260c1260 < # if defined(BSD) && !defined(__osf__) /* MJM: 24-Nov-2006 */ --- > # ifdef BSD diff ip_fil.wip2/ip_fil_osf.c ip_fil4.1.15/ip_fil_osf.c 57,63d56 < < #if defined(__osf__) < struct proc global_proc, *curproc = &global_proc; < #define p_uid p_ruid < #endif < < #if !defined(_KERNEL) 68,76c61,67 < # define radix_mask ipf_radix_mask < # define radix_node ipf_radix_node < # define radix_node_head ipf_radix_node_head < # include "netinet/ip_pool.h" < # undef radix_mask < # undef radix_node < # undef radix_node_head < #endif < --- > #define radix_mask ipf_radix_mask > #define radix_node ipf_radix_node > #define radix_node_head ipf_radix_node_head > #include "netinet/ip_pool.h" > #undef radix_mask > #undef radix_node > #undef radix_node_head diff ip_fil.wip2/ip_pool.c ip_fil4.1.15/ip_pool.c 59c59 < # include "radix_ipf.h" /* MJM: 27-Nov-2006 */ --- > # include <net/radix.h> diff ip_fil.wip2/ip_pool.h ip_fil4.1.15/ip_pool.h 19c19 < # if defined(__hpux) /* MJM: 27-Nov-2006 - osf no longer depends on radix_ipf_local.h */ --- > # if defined(__osf__) || defined(__hpux) Only in ip_fil.wip2: ip_rules.h diff ip_fil.wip2/ipf.h ip_fil4.1.15/ipf.h 13c13 < #if defined(__osf__) && defined(_KERNEL) /* MJM: 27-Nov-2006 */ --- > #if defined(__osf__) Common subdirectories: ip_fil.wip2/iplang and ip_fil4.1.15/iplang Common subdirectories: ip_fil.wip2/ipsd and ip_fil4.1.15/ipsd Common subdirectories: ip_fil.wip2/ipsend and ip_fil4.1.15/ipsend Common subdirectories: ip_fil.wip2/l4check and ip_fil4.1.15/l4check Common subdirectories: ip_fil.wip2/lib and ip_fil4.1.15/lib Common subdirectories: ip_fil.wip2/man and ip_fil4.1.15/man Common subdirectories: ip_fil.wip2/net and ip_fil4.1.15/net Common subdirectories: ip_fil.wip2/netinet and ip_fil4.1.15/netinet Common subdirectories: ip_fil.wip2/perl and ip_fil4.1.15/perl Common subdirectories: ip_fil.wip2/rules and ip_fil4.1.15/rules Common subdirectories: ip_fil.wip2/samples and ip_fil4.1.15/samples Common subdirectories: ip_fil.wip2/test and ip_fil4.1.15/test Common subdirectories: ip_fil.wip2/tools and ip_fil4.1.15/tools --- end --- Enjoy, Matt.
