1124861Sharti/* 2124861Sharti * Copyright (c) 2003 3124861Sharti * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4124861Sharti * All rights reserved. 5124861Sharti * 6124861Sharti * Author: Harti Brandt <harti@freebsd.org> 7310903Sngie * 8133211Sharti * Redistribution and use in source and binary forms, with or without 9133211Sharti * modification, are permitted provided that the following conditions 10133211Sharti * are met: 11133211Sharti * 1. Redistributions of source code must retain the above copyright 12133211Sharti * notice, this list of conditions and the following disclaimer. 13124861Sharti * 2. Redistributions in binary form must reproduce the above copyright 14124861Sharti * notice, this list of conditions and the following disclaimer in the 15124861Sharti * documentation and/or other materials provided with the distribution. 16310903Sngie * 17133211Sharti * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18133211Sharti * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19133211Sharti * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20133211Sharti * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 21133211Sharti * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22133211Sharti * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23133211Sharti * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24133211Sharti * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25133211Sharti * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26133211Sharti * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27133211Sharti * SUCH DAMAGE. 28124861Sharti * 29133211Sharti * $Begemot: bsnmp/snmpd/trans_udp.h,v 1.3 2004/08/06 08:47:16 brandt Exp $ 30124861Sharti * 31124861Sharti * UDP transport 32124861Sharti */ 33124861Shartistruct udp_port { 34124861Sharti struct tport tport; /* must begin with this */ 35124861Sharti 36124861Sharti uint8_t addr[4]; /* host byteorder */ 37124861Sharti uint16_t port; /* host byteorder */ 38124861Sharti 39124861Sharti struct port_input input; /* common input stuff */ 40124861Sharti 41124861Sharti struct sockaddr_in ret; /* the return address */ 42312516Sngie 43312516Sngie bool recvdstaddr; /* IP_RECVDSTADDR is on */ 44312516Sngie struct in_addr dstaddr; /* address the request was sent to */ 45124861Sharti}; 46124861Sharti 47124861Sharti/* argument for open call */ 48124861Shartistruct udp_open { 49124861Sharti uint8_t addr[4]; /* host byteorder */ 50124861Sharti uint16_t port; /* host byteorder */ 51124861Sharti}; 52124861Sharti 53124861Shartiextern const struct transport_def udp_trans; 54