]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/utils.h
SMUX plugin code separated to SNMP helper functions and core logic
[stg.git] / projects / stargazer / plugins / other / smux / utils.h
diff --git a/projects/stargazer/plugins/other/smux/utils.h b/projects/stargazer/plugins/other/smux/utils.h
new file mode 100644 (file)
index 0000000..7cfbdc7
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef __UTILS_H__
+#define __UTILS_H__
+
+#include <string>
+
+#include "asn1/OBJECT_IDENTIFIER.h"
+#include "SMUX-PDUs.h"
+#include "asn1/GetResponse-PDU.h"
+
+bool WaitPackets(int sd);
+bool String2OI(const std::string & str, OBJECT_IDENTIFIER_t * oi);
+std::string OI2String(OBJECT_IDENTIFIER_t * oi);
+bool SendOpenPDU(int fd);
+int SendClosePDU(int fd);
+int SendRReqPDU(int fd);
+SMUX_PDUs_t * RecvSMUXPDUs(int fd);
+int SendGetResponsePDU(int fd, GetResponse_PDU_t * getResponse);
+int SendGetResponseErrorPDU(int fd,
+                            const PDU_t * getRequest,
+                            int errorStatus,
+                            int errorIndex);
+
+#endif