Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
1586-snmp-Types-and-specs-for-snmp_pdus-enc_sco...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1586-snmp-Types-and-specs-for-snmp_pdus-enc_scoped_pdu-1.patch of Package erlang
From 239423a7f24c32150297c712da5cc9fb93834d75 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Tue, 16 Jan 2024 12:39:41 +0100 Subject: [PATCH 66/67] [snmp] Types and specs for snmp_pdus:enc_scoped_pdu/1 --- lib/snmp/doc/src/snmp_pdus.xml | 13 +++++-------- lib/snmp/src/misc/snmp_pdus.erl | 7 ++++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/snmp/doc/src/snmp_pdus.xml b/lib/snmp/doc/src/snmp_pdus.xml index f558dc52bb..715d210396 100644 --- a/lib/snmp/doc/src/snmp_pdus.xml +++ b/lib/snmp/doc/src/snmp_pdus.xml @@ -203,17 +203,14 @@ </func> <func> - <name since="">enc_scoped_pdu(ScopedPdu) -> [byte()]</name> + <name name="enc_scoped_pdu" arity="1" clause_i="1" since=""/> <fsummary>Encode an SNMP scopedPDU</fsummary> - <type> - <v>ScopedPdu = #scoped_pdu</v> - </type> <desc> <p>Encodes an SNMP ScopedPdu into a list of bytes, which can be - encrypted, and after encryption, encoded with - a call to <c>enc_encrypted_scoped_pdu/1</c>; or it can be - used as the <c>data</c> field in a <c>message</c> record, which - then can be encoded with <c>enc_message_only/1</c>.</p> + encrypted, and after encryption, encoded with + a call to <c>enc_encrypted_scoped_pdu/1</c>; or it can be + used as the <c>data</c> field in a <c>message</c> record, which + then can be encoded with <c>enc_message_only/1</c>. </p> </desc> </func> <func> diff --git a/lib/snmp/src/misc/snmp_pdus.erl b/lib/snmp/src/misc/snmp_pdus.erl index d1549b1953..c4c1bc8a28 100644 --- a/lib/snmp/src/misc/snmp_pdus.erl +++ b/lib/snmp/src/misc/snmp_pdus.erl @@ -619,7 +619,12 @@ enc_v3_header(#v3_hdr{msgID = MsgID, enc_integer_tag(MsgSecurityModel)]), Len = elength(length(Bytes)), lists:append([[48 | Len], Bytes, enc_oct_str_tag(MsgSecurityParameters)]). - + + +-spec enc_scoped_pdu(ScopedPdu) -> Bytes when + ScopedPdu :: scoped_pdu(), + Bytes :: [byte()]. + enc_scoped_pdu(#scopedPdu{contextEngineID = ContextEngineID, contextName = ContextName, data = Data}) -> -- 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