net-snmp 5.7
snmpIPv4BaseDomain.h
00001 /* IPV4 base transport support functions
00002  */
00003 #ifndef SNMPIPV4BASE_H
00004 #define SNMPIPV4BASE_H
00005 
00006 #if HAVE_NETINET_IN_H
00007 #include <netinet/in.h>
00008 #endif
00009 
00010 #include <net-snmp/library/snmp_transport.h>
00011 
00012 #ifdef __cplusplus
00013 extern          "C" {
00014 #endif
00015 
00016 /*
00017  * Prototypes
00018  */
00019 
00020     char *netsnmp_ipv4_fmtaddr(const char *prefix, netsnmp_transport *t,
00021                                void *data, int len);
00022 
00023 /*
00024  * Convert a "traditional" peername into a sockaddr_in structure which is
00025  * written to *addr_  Returns 1 if the conversion was successful, or 0 if it
00026  * failed
00027  */
00028 
00029     int netsnmp_sockaddr_in(struct sockaddr_in *addr, const char *peername,
00030                             int remote_port);
00031     int netsnmp_sockaddr_in2(struct sockaddr_in *addr, const char *inpeername,
00032                              const char *default_target);
00033 
00034 #ifdef __cplusplus
00035 }
00036 #endif
00037 #endif /* SNMPIPV4BASE_H */