mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-22 01:17:04 +00:00
Fix deprecation warning from libcap 1.9.1
This commit is contained in:
parent
73a2c42ee9
commit
68787acabe
1 changed files with 6 additions and 1 deletions
|
@ -283,6 +283,7 @@ int main(argc,argv)
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind;
|
extern int optind;
|
||||||
#endif
|
#endif
|
||||||
|
pcap_if_t *interfaces;
|
||||||
char *interface_name=0;
|
char *interface_name=0;
|
||||||
char *file=0;
|
char *file=0;
|
||||||
char *filter=0;
|
char *filter=0;
|
||||||
|
@ -382,7 +383,11 @@ int main(argc,argv)
|
||||||
|
|
||||||
if(!file){
|
if(!file){
|
||||||
if(!interface_name){
|
if(!interface_name){
|
||||||
interface_name=pcap_lookupdev(errbuf);
|
if(pcap_findalldevs(&interfaces,errbuf)==-1) {
|
||||||
|
fprintf(stderr,"PCAP: %s\n",errbuf);
|
||||||
|
err_exit("Aborting",-1);
|
||||||
|
}
|
||||||
|
interface_name=interfaces->name;
|
||||||
if(!interface_name){
|
if(!interface_name){
|
||||||
fprintf(stderr,"PCAP: %s\n",errbuf);
|
fprintf(stderr,"PCAP: %s\n",errbuf);
|
||||||
err_exit("Aborting",-1);
|
err_exit("Aborting",-1);
|
||||||
|
|
Loading…
Reference in a new issue