diff options
author | fenner <fenner@FreeBSD.org> | 1997-05-27 00:01:12 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1997-05-27 00:01:12 +0000 |
commit | 737558aa98d3b86de65ff8e1fd0fe39d5debcde7 (patch) | |
tree | de061620aa05599ec749d528046e58091ef80529 /contrib/libpcap/pcap-dlpi.c | |
parent | 498933506f435a155849919ee10bbdbc9ad42caa (diff) | |
download | FreeBSD-src-737558aa98d3b86de65ff8e1fd0fe39d5debcde7.zip FreeBSD-src-737558aa98d3b86de65ff8e1fd0fe39d5debcde7.tar.gz |
Virgin import of libpcap 0.3
Diffstat (limited to 'contrib/libpcap/pcap-dlpi.c')
-rw-r--r-- | contrib/libpcap/pcap-dlpi.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/contrib/libpcap/pcap-dlpi.c b/contrib/libpcap/pcap-dlpi.c index 7ea4877..244e32b 100644 --- a/contrib/libpcap/pcap-dlpi.c +++ b/contrib/libpcap/pcap-dlpi.c @@ -21,10 +21,6 @@ * This code contributed by Atanu Ghosh (atanu@cs.ucl.ac.uk), * University College London. */ -#ifndef lint -static char rcsid[] = - "@(#)$Header: pcap-dlpi.c,v 1.42 96/07/23 14:20:32 leres Exp $ (LBL)"; -#endif /* * Packet capture routine for dlpi under SunOS 5 @@ -40,6 +36,11 @@ static char rcsid[] = * kernel. */ +#ifndef lint +static const char rcsid[] = + "@(#) $Header: pcap-dlpi.c,v 1.47 96/12/10 23:15:00 leres Exp $ (LBL)"; +#endif + #include <sys/types.h> #include <sys/time.h> #ifdef HAVE_SYS_BUFMOD_H @@ -541,11 +542,18 @@ recv_ack(int fd, int size, const char *what, char *bufp, char *ebuf) what); break; + case DL_SYSERR: sprintf(ebuf, "recv_ack: %s: %s", what, pcap_strerror(dlp->error_ack.dl_unix_errno)); break; + case DL_UNSUPPORTED: + sprintf(ebuf, + "recv_ack: %s: Service not supplied by provider", + what); + break; + default: sprintf(ebuf, "recv_ack: %s error 0x%x", what, (bpf_u_int32)dlp->error_ack.dl_errno); @@ -593,6 +601,9 @@ dlbindreq(int fd, bpf_u_int32 sap, char *ebuf) req.dl_service_mode = DL_HP_RAWDLS; #else req.dl_sap = sap; +#ifdef DL_CLDLS + req.dl_service_mode = DL_CLDLS; +#endif #endif return (send_request(fd, (char *)&req, sizeof(req), "bind", ebuf)); |