Send snmp packet

Hello

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 ?

(I've got last version of xcode and swiftui)

thanks

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

I understand but the SNMP packet structure is not custom, I don't want to reinvent the wheel. There is not a package that can do that like Android ? If not have you a specification of that structure ?
thanks

The iOS SDK includes no SNMP APIs. If you need to render or parse SNMP messages, you’ll have to write or acquire your own code for that.

Note macOS includes a copy of Net-SNMP that’s accessible via the macOS SDK. This support is not replicated on iOS or any of its child platforms.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Send snmp packet
 
 
Q