1*26ba0b50Schristos /* $NetBSD: interface.h,v 1.10 2024/09/02 16:15:30 christos Exp $ */ 2b3a00663Schristos 30f74e101Schristos /* 40f74e101Schristos * Copyright (c) 1988-2002 50f74e101Schristos * The Regents of the University of California. All rights reserved. 60f74e101Schristos * 70f74e101Schristos * Redistribution and use in source and binary forms, with or without 80f74e101Schristos * modification, are permitted provided that: (1) source code distributions 90f74e101Schristos * retain the above copyright notice and this paragraph in its entirety, (2) 100f74e101Schristos * distributions including binary code include the above copyright notice and 110f74e101Schristos * this paragraph in its entirety in the documentation or other materials 120f74e101Schristos * provided with the distribution, and (3) all advertising materials mentioning 130f74e101Schristos * features or use of this software display the following acknowledgement: 140f74e101Schristos * ``This product includes software developed by the University of California, 150f74e101Schristos * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 160f74e101Schristos * the University nor the names of its contributors may be used to endorse 170f74e101Schristos * or promote products derived from this software without specific prior 180f74e101Schristos * written permission. 190f74e101Schristos * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 200f74e101Schristos * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 210f74e101Schristos * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 220f74e101Schristos */ 230f74e101Schristos 240f74e101Schristos #ifndef tcpdump_interface_h 250f74e101Schristos #define tcpdump_interface_h 260f74e101Schristos 270f74e101Schristos #ifdef HAVE_OS_PROTO_H 280f74e101Schristos #include "os-proto.h" 290f74e101Schristos #endif 300f74e101Schristos 31c74ad251Schristos #include "funcattrs.h" 320f74e101Schristos 330f74e101Schristos #include <stdarg.h> 340f74e101Schristos 350f74e101Schristos #if HAVE_STDINT_H 360f74e101Schristos #include <stdint.h> 370f74e101Schristos #endif 380f74e101Schristos 390f74e101Schristos #ifndef HAVE_STRLCAT 400f74e101Schristos extern size_t strlcat(char *, const char *, size_t); 410f74e101Schristos #endif 420f74e101Schristos #ifndef HAVE_STRLCPY 430f74e101Schristos extern size_t strlcpy(char *, const char *, size_t); 440f74e101Schristos #endif 450f74e101Schristos 460f74e101Schristos #ifndef HAVE_STRDUP 470f74e101Schristos extern char *strdup(const char *); 480f74e101Schristos #endif 490f74e101Schristos 500f74e101Schristos #ifndef HAVE_STRSEP 510f74e101Schristos extern char *strsep(char **, const char *); 520f74e101Schristos #endif 530f74e101Schristos 540f74e101Schristos #endif 550f74e101Schristos 560f74e101Schristos extern char *program_name; /* used to generate self-identifying messages */ 570f74e101Schristos 580f74e101Schristos #include <pcap.h> 590f74e101Schristos 600f74e101Schristos #ifndef HAVE_BPF_DUMP 610f74e101Schristos struct bpf_program; 62c74ad251Schristos #endif 630f74e101Schristos 64c74ad251Schristos /* 65c74ad251Schristos * With Capsicum bpf_dump() may be not declared even if HAVE_BPF_DUMP is set. 66c74ad251Schristos */ 67c74ad251Schristos #if !defined(HAVE_BPF_DUMP) || \ 68*26ba0b50Schristos (defined(HAVE_BPF_DUMP) && defined(HAVE_CAPSICUM) && !defined(bpf_dump)) 690f74e101Schristos extern void bpf_dump(const struct bpf_program *, int); 700f74e101Schristos 710f74e101Schristos #endif 72