Subject: Re: crunching ipf
To: None <>
From: Jed Davis <>
List: current-users
Date: 03/30/2006 00:47:24
Chris Tribo <> writes:

> Has anyone managed to successfully crunch ipfilter and tools? I'm
> getting undefined references to "use_inet6" and opts in "libipf.a".

I have, with NetBSD 2.0.  My crunchgen config file has these lines in
it; it's, uh, clearly not the most elegant approach, but it did work:

  srcdirs /usr/src/usr.sbin/ipf
  special ipf objpaths ipf/ipf.o ipf/ipfcomp.o ipf/ipf_y.o ipf/ipf_l.o /usr/obj/i386/usr/src/usr.sbin/ipf/libipf/libipf.a

The absolute paths would probably need to be changed, and the
hard-coded list of objects should also be checked before use.  And, of
course, multiple ipf tools would need multiple copies of the library;
I was going for minimality, and so included only ipf(8).

I also have something similar for syslogd, which has the same problem
(library wanting symbols from executable, which crunchgen renames)
with libwrap.a.

(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))