pcap-nit.c (146768) | pcap-nit.c (147894) |
---|---|
1/* 2 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 6 unchanged lines hidden (view full) --- 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 */ 21#ifndef lint 22static const char rcsid[] _U_ = | 1/* 2 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 6 unchanged lines hidden (view full) --- 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 */ 21#ifndef lint 22static const char rcsid[] _U_ = |
23 "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.57 2004/10/19 07:06:13 guy Exp $ (LBL)"; | 23 "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.57.2.1 2005/05/03 18:54:37 guy Exp $ (LBL)"; |
24#endif 25 26#ifdef HAVE_CONFIG_H 27#include "config.h" 28#endif 29 30#include <sys/types.h> 31#include <sys/time.h> --- 297 unchanged lines hidden (view full) --- 329 p->dlt_list[0] = DLT_EN10MB; 330 p->dlt_list[1] = DLT_DOCSIS; 331 p->dlt_count = 2; 332 } 333 334 p->read_op = pcap_read_nit; 335 p->inject_op = pcap_inject_nit; 336 p->setfilter_op = install_bpf_program; /* no kernel filtering */ | 24#endif 25 26#ifdef HAVE_CONFIG_H 27#include "config.h" 28#endif 29 30#include <sys/types.h> 31#include <sys/time.h> --- 297 unchanged lines hidden (view full) --- 329 p->dlt_list[0] = DLT_EN10MB; 330 p->dlt_list[1] = DLT_DOCSIS; 331 p->dlt_count = 2; 332 } 333 334 p->read_op = pcap_read_nit; 335 p->inject_op = pcap_inject_nit; 336 p->setfilter_op = install_bpf_program; /* no kernel filtering */ |
337 p->setdirection_op = NULL; /* Not implemented. */ |
|
337 p->set_datalink_op = NULL; /* can't change data link type */ 338 p->getnonblock_op = pcap_getnonblock_fd; 339 p->setnonblock_op = pcap_setnonblock_fd; 340 p->stats_op = pcap_stats_nit; 341 p->close_op = pcap_close_nit; 342 343 return (p); 344 bad: 345 if (fd >= 0) 346 close(fd); 347 free(p); 348 return (NULL); 349} 350 351int 352pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf) 353{ 354 return (0); 355} | 338 p->set_datalink_op = NULL; /* can't change data link type */ 339 p->getnonblock_op = pcap_getnonblock_fd; 340 p->setnonblock_op = pcap_setnonblock_fd; 341 p->stats_op = pcap_stats_nit; 342 p->close_op = pcap_close_nit; 343 344 return (p); 345 bad: 346 if (fd >= 0) 347 close(fd); 348 free(p); 349 return (NULL); 350} 351 352int 353pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf) 354{ 355 return (0); 356} |