Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
2878-snmp-Types-and-specs-for-snmp_pdus-dec_mes...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2878-snmp-Types-and-specs-for-snmp_pdus-dec_message_only-.patch of Package erlang
From f4f0ba22eaadf2497b0af9f1a8128e4850f5b4da Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Tue, 16 Jan 2024 09:01:51 +0100 Subject: [PATCH 58/67] [snmp] Types and specs for snmp_pdus:dec_message_only/1 --- lib/snmp/doc/src/snmp_pdus.xml | 11 ++++------- lib/snmp/src/misc/snmp_pdus.erl | 5 +++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/snmp/doc/src/snmp_pdus.xml b/lib/snmp/doc/src/snmp_pdus.xml index 7fd571a433..fe65daaf52 100644 --- a/lib/snmp/doc/src/snmp_pdus.xml +++ b/lib/snmp/doc/src/snmp_pdus.xml @@ -87,16 +87,13 @@ </func> <func> - <name since="">dec_message_only([byte()]) -> Message</name> + <name name="dec_message_only" arity="1" clause_i="1" since=""/> <fsummary>Decode an SNMP Message, but not the data part</fsummary> - <type> - <v>Message = #message</v> - </type> <desc> <p>Decodes a list of bytes into an SNMP Message, but does not - decode the data part of the Message. That means, data is still - a list of bytes, normally an encoded <c>PDU</c> (v1 and V2) or an - encoded and possibly encrypted <c>scopedPDU</c> (v3).</p> + decode the data part of the Message. That means, data is still + a list of bytes, normally an encoded <c>PDU</c> (v1 and V2) or an + encoded and possibly encrypted <c>scopedPDU</c> (v3). </p> </desc> </func> <func> diff --git a/lib/snmp/src/misc/snmp_pdus.erl b/lib/snmp/src/misc/snmp_pdus.erl index d413617b73..953ef94e2d 100644 --- a/lib/snmp/src/misc/snmp_pdus.erl +++ b/lib/snmp/src/misc/snmp_pdus.erl @@ -70,6 +70,11 @@ dec_message([48 | Bytes]) -> dec_rest_v1_v2_msg(Vsn, Rest) end. + +-spec dec_message_only(Bytes) -> Message when + Bytes :: [byte()], + Message :: message(). + dec_message_only([48 | Bytes]) -> Bytes2 = get_data_bytes(Bytes), case dec_snmp_version(Bytes2) of -- 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