/usr/include/gsnmp/transport.h is in libgsnmp0-dev 0.3.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | /*
* GNET-SNMP -- glib-based SNMP library
*
* Copyright (c) 2003 Juergen Schoenwaelder
* Copyright (c) 1998 Gregory McLean & Jochen Friedrich
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Cambridge, MA 02139, USA.
*
* $Id: transport.h 3178 2009-07-28 10:23:24Z schoenw $
*/
#ifndef __GNET_SNMP_TRANSPORT_H__
#define __GNET_SNMP_TRANSPORT_H__
/*
* Transport address representation for the different SNMP transport
* domains.
*/
typedef enum {
GNET_SNMP_TDOMAIN_NONE = 0,
GNET_SNMP_TDOMAIN_UDP_IPV4 = 1, /* RFC 3417 */
GNET_SNMP_TDOMAIN_UDP_IPV6 = 2,
GNET_SNMP_TDOMAIN_IPX = 3, /* RFC 3417 */
GNET_SNMP_TDOMAIN_TCP_IPV4 = 4, /* RFC 3430 */
GNET_SNMP_TDOMAIN_TCP_IPV6 = 5, /* RFC 3430 */
GNET_SNMP_TDOMAIN_LOCAL = 6
} GNetSnmpTDomain;
typedef struct {
GNetSnmpTDomain domain;
union {
GInetAddr *inetaddr;
gchar *path;
};
} GNetSnmpTAddress;
GNetSnmpTAddress* gnet_snmp_taddress_new(void);
GNetSnmpTAddress* gnet_snmp_taddress_new_inet(GNetSnmpTDomain domain,
GInetAddr* addr);
GNetSnmpTAddress* gnet_snmp_taddress_new_path(GNetSnmpTDomain domain,
gchar *path);
GNetSnmpTAddress* gnet_snmp_taddress_clone(GNetSnmpTAddress *taddr);
gchar* gnet_snmp_taddress_get_short_name(const GNetSnmpTAddress *taddr);
void gnet_snmp_taddress_delete(GNetSnmpTAddress *taddr);
/*
* The maximum datagram size we are prepared to deal with.
*/
#define MAX_DGRAM_SIZE 32768
/*
* Transport related runtime error handling.
*/
typedef enum
{
GNET_SNMP_TRANSPORT_ERROR_SEND,
GNET_SNMP_TRANSPORT_ERROR_RECV,
GNET_SNMP_TRANSPORT_ERROR_SOCKET,
GNET_SNMP_TRANSPORT_ERROR_CONNECT,
GNET_SNMP_TRANSPORT_ERROR_REGISTER,
GNET_SNMP_TRANSPORT_ERROR_UNSUPPORTED
} GNetSnmpTransportError;
#define GNET_SNMP_TRANSPORT_ERROR gnet_snmp_transport_error_quark()
GQuark gnet_snmp_transport_error_quark();
/*
* The entrance into the transport module.
*/
gboolean gnet_snmp_transport_send (GNetSnmpTAddress *taddress,
guchar *msg,
guint msg_len,
GError **error);
#endif /* __GNET_SNMP_TRANSPORT_H__ */
|