Hello!
I have been trying to get libpcap 0.6.2 compiled and installed on my HP-UX
11.0 system here and I was getting the following error during the make:
# make
cc -O -Ae +z -I. -DHAVE_CONFIG_H -c ./pcap-dlpi.c
cc: "pcap-dlpi.c", line 861: warning 604: Pointers are not
assignment-compatible.
cc: "pcap-dlpi.c", line 861: warning 563: Argument #1 is not the correct
type.
cc: "pcap-dlpi.c", line 862: warning 604: Pointers are not
assignment-compatible.
cc: "pcap-dlpi.c", line 862: warning 563: Argument #1 is not the correct
type.
Here is the paragraph of code:
#ifdef HAVE_HP_PPA_INFO_T_DL_MODULE_ID_1
/*
* The "dl_hp_ppa_info_t" structure has a "dl_module_id_1"
* member that should, in theory, contain the part of the
* name for the device that comes before the unit number,
* and should also have a "dl_module_id_2" member that may
* contain an alternate name (e.g., I think Ethernet devices
* have both "lan", for "lanN", and "snap", for "snapN", with
* the former being for Ethernet packets and the latter being
* for 802.3/802.2 packets).
*
* Search for the device that has the specified name and
* instance number.
*/
for (i = 0; i < ap->dl_count; i++) {
if ((strcmp(ip->dl_module_id_1, device) == 0 ||
strcmp(ip->dl_module_id_2, device) == 0) &&
ip->dl_instance_num == unit)
break;
ip = (dl_hp_ppa_info_t *)((u_char *)ipstart +
ip->dl_next_offset);
}
#else
The lines that have the error were the lines where the strcmp is done. I had
to change them to cast the dl_module_id as a character. It is defined in
/usr/include/sys/dlpi_ext.h as uint8_t which the compiler apparently doesn't
like to treat as a string. I had to get help from a non-unix C programmer,
so I hope we did the right thing here. I'm strictly a novice when it comes
to C programming. At any rate, the lines with strcmp now look like this:
if ((strcmp((char*)ip->dl_module_id_1, device) == 0 ||
strcmp((char*)ip->dl_module_id_2, device) == 0) &&
and it compiles beautifully now. Hope we did this right, and this helps
someone else out!
Jerel Crosland
21st Century Insurance
Unix Level 2 Support
(818)704-3187
***********************************************************************
This e-mail and any files transmitted with it are intended
solely for the use of the addressee. This e-mail may
contain confidential and/or legally privileged information.
Any review, transmission, disclosure, copying, or any action
taken or not taken, by other than the intended recipient, in
reliance on the information, is prohibited. If you received
this e-mail in error, notify the sender and delete this e-mail
(and any accompanying material) from your computer and
network. In addition, please be advised that 21st Century
Insurance Group reserves the right to monitor, access and
review all messages, data and images transmitted through
our electronic mail system. By using our e-mail system, you
consent to this monitoring.
***********************************************************************
-
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