Ethereal-dev: Re: [Ethereal-dev] FW: hp-ux 11.11 eth 10.x and Gdk-CRITICAL libpixbufloader-xpm

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Wed, 10 Aug 2005 12:55:23 -0700
Eden, Edward - St. Louis, MO wrote:

Found it. There is a known problem where you should not use –lc when
you link. Linking in libc is handled for you by the linker. If –lc is
used it overrides the order of libraries that is needed for the dlopen()
call that glib makes. I linked by hand and left off the –lc and it
works.

That sounds like a libtool bug. (We don't put the -lc in there ourselves.) You might want to report this to the libtool developers.

But guess what, just like the other ppl, I’m now getting
recv_ack: promisc_phys: UNIX error - Device busy when trying to capture on the interface.

If this is a version of libpcap prior to 0.9.1, get the source to 0.9.3 from tcpdump.org, apply the attached patch to it, build and install it, and, if necessary, reconfigure Ethereal to build with that version and try it. (The patch is as yet untested.)
? .gdb_history
? autom4te.cache
? CHDLC-AND-PPP-HELL
? configure.lineno
? denokify
? denokify.c
? DEVICE-NAMES
? errs
? errspwd
? filtertest
? findalldevstest
? pcap-arp
? pcap-arp.c
? pcap-dlpi.c.bankier
? pcap-dlpi.c.msgdisc
? pcap-ping
? pcap-ping.c
Index: pcap-dlpi.c
===================================================================
RCS file: /tcpdump/master/libpcap/pcap-dlpi.c,v
retrieving revision 1.114
diff -c -r1.114 pcap-dlpi.c
*** pcap-dlpi.c	3 May 2005 18:53:58 -0000	1.114
--- pcap-dlpi.c	10 Aug 2005 18:57:43 -0000
***************
*** 1039,1045 ****
  		/*
  		 * For any error other than a UNIX EBUSY, give up.
  		 */
! 		if (uerror != EBUSY)
  			return (-1);
  
  		/*
--- 1039,1049 ----
  		/*
  		 * For any error other than a UNIX EBUSY, give up.
  		 */
! 		if (uerror != EBUSY) {
! 			/*
! 			 * dlbindack() has already filled in ebuf for
! 			 * this error.
! 			 */
  			return (-1);
  
  		/*
***************
*** 1050,1058 ****
  		 */
  		*ebuf = '\0';
  		hpsap++;
! 		if (hpsap > 100)
  			return (-1);
  	}
  }
  #endif
  
--- 1054,1067 ----
  		 */
  		*ebuf = '\0';
  		hpsap++;
! 		if (hpsap > 100) {
! 			strlcpy(ebuf,
! 			    "All SAPs from 22 through 100 are in use",
! 			    PCAP_ERRBUF_SIZE);
  			return (-1);
+ 		}
  	}
+ 	return (0);
  }
  #endif
  
***************
*** 1126,1131 ****
--- 1135,1147 ----
  	struct	strbuf	ctl;
  	int	flags;
  
+ 	/*
+ 	 * Clear out "*uerror", so it's only set for DL_ERROR_ACK/DL_SYSERR,
+ 	 * making that the only place where EBUSY is treated specially.
+ 	 */
+ 	if (uerror != NULL)
+ 		*uerror = 0;
+ 
  	ctl.maxlen = MAXDLBUF;
  	ctl.len = 0;
  	ctl.buf = bufp;
***************
*** 1161,1168 ****
  			break;
  
  		default:
- 			if (uerror != NULL)
- 				*uerror = 0;
  			snprintf(ebuf, PCAP_ERRBUF_SIZE, "recv_ack: %s: %s",
  			    what, dlstrerror(dlp->error_ack.dl_errno));
  			break;
--- 1177,1182 ----
***************
*** 1170,1177 ****
  		return (-1);
  
  	default:
- 		if (uerror != NULL)
- 			*uerror = 0;
  		snprintf(ebuf, PCAP_ERRBUF_SIZE,
  		    "recv_ack: %s: Unexpected primitive ack %s",
  		    what, dlprim(dlp->dl_primitive));
--- 1184,1189 ----
***************
*** 1179,1186 ****
  	}
  
  	if (ctl.len < size) {
- 		if (uerror != NULL)
- 			*uerror = 0;
  		snprintf(ebuf, PCAP_ERRBUF_SIZE,
  		    "recv_ack: %s: Ack too small (%d < %d)",
  		    what, ctl.len, size);
--- 1191,1196 ----