1e5054602SMark Johnston /*- 2e5054602SMark Johnston * Copyright (c) 2005-2014 Sandvine Incorporated 3e5054602SMark Johnston * Copyright (c) 2000 Darrell Anderson <anderson@cs.duke.edu> 4e5054602SMark Johnston * All rights reserved. 5e5054602SMark Johnston * 6e5054602SMark Johnston * Redistribution and use in source and binary forms, with or without 7e5054602SMark Johnston * modification, are permitted provided that the following conditions 8e5054602SMark Johnston * are met: 9e5054602SMark Johnston * 1. Redistributions of source code must retain the above copyright 10e5054602SMark Johnston * notice, this list of conditions and the following disclaimer. 11e5054602SMark Johnston * 2. Redistributions in binary form must reproduce the above copyright 12e5054602SMark Johnston * notice, this list of conditions and the following disclaimer in the 13e5054602SMark Johnston * documentation and/or other materials provided with the distribution. 14e5054602SMark Johnston * 15e5054602SMark Johnston * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16e5054602SMark Johnston * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17e5054602SMark Johnston * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18e5054602SMark Johnston * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19e5054602SMark Johnston * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20e5054602SMark Johnston * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21e5054602SMark Johnston * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22e5054602SMark Johnston * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23e5054602SMark Johnston * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24e5054602SMark Johnston * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25e5054602SMark Johnston * SUCH DAMAGE. 26e5054602SMark Johnston */ 27e5054602SMark Johnston 28e5054602SMark Johnston #ifndef _NETINET_NETDUMP_H_ 29e5054602SMark Johnston #define _NETINET_NETDUMP_H_ 30e5054602SMark Johnston 31e5054602SMark Johnston #include <sys/types.h> 32e5054602SMark Johnston #include <sys/disk.h> 33e5054602SMark Johnston #include <sys/ioccom.h> 34e5054602SMark Johnston 35e5054602SMark Johnston #include <net/if.h> 36e5054602SMark Johnston #include <netinet/in.h> 37e5054602SMark Johnston 38*7790c8c1SConrad Meyer /* Netdump wire protocol definitions are consumed by the ftp/netdumpd port. */ 39e5054602SMark Johnston #define NETDUMP_PORT 20023 /* Server UDP port for heralds. */ 40e5054602SMark Johnston #define NETDUMP_ACKPORT 20024 /* Client UDP port for acks. */ 41e5054602SMark Johnston 42*7790c8c1SConrad Meyer #define NETDUMP_HERALD DEBUGNET_HERALD 43*7790c8c1SConrad Meyer #define NETDUMP_FINISHED DEBUGNET_FINISHED 44*7790c8c1SConrad Meyer #define NETDUMP_VMCORE DEBUGNET_DATA 45e5054602SMark Johnston #define NETDUMP_KDH 4 /* Contains kernel dump header. */ 46e5054602SMark Johnston #define NETDUMP_EKCD_KEY 5 /* Contains kernel dump key. */ 47e5054602SMark Johnston 48e5054602SMark Johnston #define NETDUMP_DATASIZE 4096 /* Arbitrary packet size limit. */ 49e5054602SMark Johnston 50*7790c8c1SConrad Meyer /* For netdumpd. */ 51*7790c8c1SConrad Meyer #ifndef _KERNEL 52*7790c8c1SConrad Meyer #define netdump_msg_hdr debugnet_msg_hdr 53*7790c8c1SConrad Meyer #define mh__pad mh_aux2 54*7790c8c1SConrad Meyer #define netdump_ack debugnet_ack 55*7790c8c1SConrad Meyer #define na_seqno da_seqno 56*7790c8c1SConrad Meyer #endif /* !_KERNEL */ 57e5054602SMark Johnston 586b6e2954SConrad Meyer #define _PATH_NETDUMP "/dev/netdump" 59e5054602SMark Johnston 60e5054602SMark Johnston #endif /* _NETINET_NETDUMP_H_ */ 61