net-snmp 5.7
snmpUDPBaseDomain.h
00001 #ifndef SNMPUDPBASEDOMAIN_H
00002 #define SNMPUDPBASEDOMAIN_H
00003 
00004 config_require(SocketBase)
00005 
00006 #include <net-snmp/library/snmp_transport.h>
00007 
00008 #ifdef __cplusplus
00009 extern          "C" {
00010 #endif
00011 
00012 /*
00013  * Prototypes
00014  */
00015     void _netsnmp_udp_sockopt_set(int fd, int local);
00016     int netsnmp_udpbase_recv(netsnmp_transport *t, void *buf, int size,
00017                              void **opaque, int *olength);
00018     int netsnmp_udpbase_send(netsnmp_transport *t, void *buf, int size,
00019                              void **opaque, int *olength);
00020 
00021 #if defined(linux) && defined(IP_PKTINFO) \
00022     || defined(IP_RECVDSTADDR) && !defined(_MSC_VER)
00023     int netsnmp_udpbase_recvfrom(int s, void *buf, int len,
00024                                  struct sockaddr *from, socklen_t *fromlen,
00025                                  struct sockaddr *dstip, socklen_t *dstlen,
00026                                  int *if_index);
00027     int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index,
00028                                struct sockaddr *remote, void *data, int len);
00029 #endif
00030 
00031 #ifdef __cplusplus
00032 }
00033 #endif
00034 
00035 #endif /* SNMPUDPBASEDOMAIN_H */