> I am compiling a file that I foind on the net against LIBPCAP, but I have ran in
> to the following problem.
>
> The file uses the following include files
>
> /netinet/ether.h
> /net/ethernet.h
>
> These are present in Linux, but I am using Solaris 2.8.
>
> The files are not in solaris.
>
> What alternatives can I use?
That depends on why that (arguably sloppily-written) program is
including those files.
<netinet/ether.h> on one Red Hat 6.x system here
1) includes <netinet/if_ether.h> to get a definition of "struct
ether_addr"
and
2) defines functions such as "ether_ntoa()", "ether_aton()", and
so on.
Solaris 2.6, at least also has <netinet/if_ether.h>, which defines
"struct ether_addr".
It also has "ether_ntoa()", "ether_aton()", and company, but, in an
appalling bit of sloppiness, Sun don't seem to have supplied
declarations of those functions in any header file I can find.
So including <netinet/if_ether.h> will, on Solaris 2.6, take care of 1);
it won't do anything about 2), but it appears nothing can do anything
about 2). Solaris 8 seems to have the same problem.
However, the program will probably compile, and work correctly, even if
those functions aren't declared, and you can, I guess, declare them by
hand:
char *ether_ntoa(struct ether_addr *e);
struct ether_addr *ether_aton(char *s);
int ether_ntohost(char *hostname, struct ether_addr *e);
int ether_hostton(char *hostname, struct ether_addr *e);
int ether_line(char *l, struct ether_addr *e, char *hostname);
<net/ethernet.h>, on that Red Hat system, defines a bunch of
Ethernet-specific things. However, it's included by
<netinet/if_ether.h>, so I'd suggest, as Vishal Malhan did, replacing
the includes of <netinet/ether.h> and <net/ethernet.h> with an include
of <netinet/if_ether.h>, and, if that doesn't compile, searching on your
Solaris system for whatever header files declare or define what stuff
still isn't being defined.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe