1189623Srwatson/*- 2189623Srwatson * Copyright (c) 2008-2009 Robert N. M. Watson 3189623Srwatson * All rights reserved. 4189623Srwatson * 5189623Srwatson * Redistribution and use in source and binary forms, with or without 6189623Srwatson * modification, are permitted provided that the following conditions 7189623Srwatson * are met: 8189623Srwatson * 1. Redistributions of source code must retain the above copyright 9189623Srwatson * notice, this list of conditions and the following disclaimer. 10189623Srwatson * 2. Redistributions in binary form must reproduce the above copyright 11189623Srwatson * notice, this list of conditions and the following disclaimer in the 12189623Srwatson * documentation and/or other materials provided with the distribution. 13189623Srwatson * 14189623Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15189623Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16189623Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17189623Srwatson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18189623Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19189623Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20189623Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21189623Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22189623Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23189623Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24189623Srwatson * SUCH DAMAGE. 25189623Srwatson * 26189623Srwatson * $FreeBSD$ 27189623Srwatson */ 28189623Srwatson 29189623Srwatson#ifndef TCPP_H 30189623Srwatson#define TCPP_H 31189623Srwatson 32189623Srwatsonextern struct sockaddr_in localipbase, remoteip; 33208873Srwatsonextern int cflag, hflag, lflag, mflag, pflag, sflag, tflag; 34208873Srwatsonextern int Iflag, Mflag, Pflag; 35189623Srwatsonextern uint64_t bflag; 36189623Srwatsonextern u_short rflag; 37189623Srwatson 38189623Srwatson#define TCPP_MAGIC 0x84e812f7 39189623Srwatsonstruct tcpp_header { 40189623Srwatson u_int32_t th_magic; 41189623Srwatson u_int64_t th_len; 42189623Srwatson} __packed; 43189623Srwatson 44189623Srwatsonvoid tcpp_client(void); 45189623Srwatsonvoid tcpp_header_encode(struct tcpp_header *thp); 46189623Srwatsonvoid tcpp_header_decode(struct tcpp_header *thp); 47189623Srwatsonvoid tcpp_server(void); 48189623Srwatson 49189623Srwatson#define SYSCTLNAME_CPUS "kern.smp.cpus" 50189623Srwatson#define SYSCTLNAME_CPTIME "kern.cp_time" 51189623Srwatson 52189623Srwatson#endif /* TCPP_H */ 53