1126239Smlaier/*- 2126239Smlaier * Copyright (c) 2003 Sam Leffler, Errno Consulting 3126239Smlaier * All rights reserved. 4126239Smlaier * 5126239Smlaier * Redistribution and use in source and binary forms, with or without 6126239Smlaier * modification, are permitted provided that the following conditions 7126239Smlaier * are met: 8126239Smlaier * 1. Redistributions of source code must retain the above copyright 9126239Smlaier * notice, this list of conditions and the following disclaimer, 10126239Smlaier * without modification. 11126239Smlaier * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12126239Smlaier * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13126239Smlaier * redistribution must be conditioned upon including a substantially 14126239Smlaier * similar Disclaimer requirement for further binary redistribution. 15126239Smlaier * 3. Neither the names of the above-listed copyright holders nor the names 16126239Smlaier * of any contributors may be used to endorse or promote products derived 17126239Smlaier * from this software without specific prior written permission. 18126239Smlaier * 19126239Smlaier * NO WARRANTY 20126239Smlaier * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21126239Smlaier * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22126239Smlaier * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 23126239Smlaier * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 24126239Smlaier * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 25126239Smlaier * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26126239Smlaier * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27126239Smlaier * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 28126239Smlaier * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29126239Smlaier * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30126239Smlaier * THE POSSIBILITY OF SUCH DAMAGES. 31126239Smlaier * 32126239Smlaier * $FreeBSD: releng/11.0/sys/netinet/ip_divert.h 201527 2010-01-04 19:01:22Z luigi $ 33126239Smlaier */ 34126239Smlaier 35126239Smlaier#ifndef _NETINET_IP_DIVERT_H_ 36126239Smlaier#define _NETINET_IP_DIVERT_H_ 37126239Smlaier 38126239Smlaier/* 39201527Sluigi * divert has no custom kernel-userland API. 40201527Sluigi * 41201527Sluigi * All communication occurs through a sockaddr_in socket where 42201527Sluigi * 43201527Sluigi * kernel-->userland 44201527Sluigi * sin_port = matching rule, host format; 45201527Sluigi * sin_addr = IN: first address of the incoming interface; 46201527Sluigi * OUT: INADDR_ANY 47201527Sluigi * sin_zero = if fits, the interface name (max 7 bytes + NUL) 48201527Sluigi * 49201527Sluigi * userland->kernel 50201527Sluigi * sin_port = restart-rule - 1, host order 51201527Sluigi * (we restart at sin_port + 1) 52201527Sluigi * sin_addr = IN: address of the incoming interface; 53201527Sluigi * OUT: INADDR_ANY 54136714Sandre */ 55126239Smlaier#endif /* _NETINET_IP_DIVERT_H_ */ 56