Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang
erlang
1580-snmp-Types-and-specs-for-snmp_pdus-dec_sco...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1580-snmp-Types-and-specs-for-snmp_pdus-dec_scoped_pdu-1.patch of Package erlang
From 8545f4e16dcc3f4084414165968c65fc4d92cc82 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Tue, 16 Jan 2024 09:55:47 +0100 Subject: [PATCH 60/67] [snmp] Types and specs for snmp_pdus:dec_scoped_pdu/1 --- lib/snmp/doc/src/snmp_pdus.xml | 17 +++++++++++++---- lib/snmp/src/misc/snmp_pdus.erl | 13 +++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/lib/snmp/doc/src/snmp_pdus.xml b/lib/snmp/doc/src/snmp_pdus.xml index a6ecceef63..dc99203a19 100644 --- a/lib/snmp/doc/src/snmp_pdus.xml +++ b/lib/snmp/doc/src/snmp_pdus.xml @@ -91,6 +91,17 @@ --> </datatype> + <datatype> + <name name="scoped_pdu"/> + <!-- + <desc> + <p> + TBD + </p> + </desc> + --> + </datatype> + </datatypes> <funcs> @@ -126,12 +137,10 @@ <p>Decodes a list of bytes into an SNMP Pdu.</p> </desc> </func> + <func> - <name since="">dec_scoped_pdu([byte()]) -> ScopedPdu</name> + <name name="dec_scoped_pdu" arity="1" clause_i="1" since=""/> <fsummary>Decode an SNMP ScopedPdu</fsummary> - <type> - <v>ScopedPdu = #scoped_pdu</v> - </type> <desc> <p>Decodes a list of bytes into an SNMP ScopedPdu.</p> </desc> diff --git a/lib/snmp/src/misc/snmp_pdus.erl b/lib/snmp/src/misc/snmp_pdus.erl index 49edbf11a5..023b23842e 100644 --- a/lib/snmp/src/misc/snmp_pdus.erl +++ b/lib/snmp/src/misc/snmp_pdus.erl @@ -49,9 +49,10 @@ ]). --type message() :: #message{}. --type trappdu() :: #trappdu{}. --type pdu() :: #pdu{}. +-type message() :: #message{}. +-type trappdu() :: #trappdu{}. +-type pdu() :: #pdu{}. +-type scoped_pdu() :: #scopedPdu{}. %% -compile(export_all). @@ -162,7 +163,11 @@ dec_scoped_pdu_data([4 | Bytes]) -> % encryptedPDU {EncryptedPDU, []} = dec_oct_str_notag(Bytes), EncryptedPDU. - + +-spec dec_scoped_pdu(Bytes) -> ScopedPDU when + Bytes :: [byte()], + ScopedPDU :: scoped_pdu(). + dec_scoped_pdu([48 | Bytes]) -> element(1, dec_scoped_pdu_notag(Bytes)). -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor