trans_udp.c (133211) | trans_udp.c (150920) |
---|---|
1/* 2 * Copyright (c) 2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Author: Harti Brandt <harti@freebsd.org> 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/* 2 * Copyright (c) 2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Author: Harti Brandt <harti@freebsd.org> 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $Begemot: bsnmp/snmpd/trans_udp.c,v 1.4 2004/08/06 08:47:16 brandt Exp $ | 29 * $Begemot: bsnmp/snmpd/trans_udp.c,v 1.5 2005/10/04 08:46:56 brandt_h Exp $ |
30 * 31 * UDP transport 32 */ 33#include <sys/types.h> 34 35#include <stdlib.h> 36#include <syslog.h> 37#include <string.h> --- 94 unchanged lines hidden (view full) --- 132 p->input.fd = -1; 133 return (SNMP_ERR_GENERR); 134 } 135 return (SNMP_ERR_NOERROR); 136} 137 138/* 139 * Create a new SNMP Port object and start it, if we are not | 30 * 31 * UDP transport 32 */ 33#include <sys/types.h> 34 35#include <stdlib.h> 36#include <syslog.h> 37#include <string.h> --- 94 unchanged lines hidden (view full) --- 132 p->input.fd = -1; 133 return (SNMP_ERR_GENERR); 134 } 135 return (SNMP_ERR_NOERROR); 136} 137 138/* 139 * Create a new SNMP Port object and start it, if we are not |
140 * in initialisation mode. The arguments are in host byte order. | 140 * in initialization mode. The arguments are in host byte order. |
141 */ 142static int 143udp_open_port(u_int8_t *addr, u_int32_t udp_port, struct udp_port **pp) 144{ 145 struct udp_port *port; 146 int err; 147 148 if (udp_port > 0xffff) --- 161 unchanged lines hidden --- | 141 */ 142static int 143udp_open_port(u_int8_t *addr, u_int32_t udp_port, struct udp_port **pp) 144{ 145 struct udp_port *port; 146 int err; 147 148 if (udp_port > 0xffff) --- 161 unchanged lines hidden --- |