Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: Compile error on netbsd
From: Jay Fink <jay.fink () gmail com>
Date: Fri, 28 Aug 2009 12:52:18 -0400

On Fri, Aug 28, 2009 at 12:38 PM, David Fifield<david () bamsoftware com> wrote:
On Fri, Aug 28, 2009 at 11:27:04AM -0400, Jay Fink wrote:
Finally had a chance to look into this some more; David was dead on;
the ifconf struct is different on NetBSD;  ifcu_buf  was changed to
void * during a core address type cull:

struct  ifconf {
        int     ifc_len;                /* size of associated buffer */
        union {
                void *  ifcu_buf;
                struct  ifreq *ifcu_req;
        } ifc_ifcu;

As a dirty trick I changed it back and it compiles but still does not
send back an iflist, I will work on a macro or something to replace it
but I'm not sure why it kicks back it can't find the information yet.

Note FreeBSD8 and Linux use the core address pointer.

I don't know what you mean by "core address." Does the attached patch

on freebsd and glibc ifcu_buf is type caddr_t (or core address). On
NetBSD it is type void *
sorry for the confusion, core address is the long name for caddr_t.

work? It just casts ifc_buf to a char pointer when we want to do
byte-level arithmetic. You should try it with unmodified header files.

the patch doesn't work right; I thought it would but it does not.  I
got it to compile by changing the header files but I know that is not
a real solution. What I meant was I am going to keep working on a real
solution;  perhaps redefining ifconf  for NetBSD and OpenBSD.


David Fifield


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]