I want to know how to send a PDU (set) in SNMP format on port 161.
I know the OID, the community string "public", the version (1) etc
Is there an API or package that can do that easily in swiftui ?
In a situation like this you would decouple SwiftUI from your network code. In this case, start off with creating a network management class that uses Network Framework's NWConnection
. Since, SNMP is built on top of UDP, NWConnection
should allow you to create the UDP transport and then you can define a custom structure for how your SNMP packet with be sent over the wire. After that's complete, wire the network code back up to SwiftUI.
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com