[socket] Support for Payload Protocol Identifier for SCTP sockets in standard socket library

Offen
#99,286 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
networking

Rechercherichtung

Beginne mit den im Issue beschriebenen Standard-Einstiegspunkten socket.socket(..., IPPROTO_SCTP) und send(bytes, flags), und lies anschließend die referenzierten PPID-Anforderungen aus RFC 9260. Ermittle, wie die Standard-Socket-API eine PPID akzeptieren könnte, und überprüfe, dass der daraus resultierende SCTP DATA-Chunk sie trägt, einschließlich der erwähnten NGAP-Werte. Im Issue sind keine Quelldateien oder Tests angegeben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

stdlib topic-socket type-feature

Feature or enhancement

Currently is there a way to specify the payload protocol identifier for an SCTP socket created using the socket library?

For example, the SCTP socket object created as sock_amf = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SCTP) exposes sock_amf.send(bytes, flags) but has no way to mention the payload protocol identifier as mentioned in https://www.rfc-editor.org/rfc/rfc9260.html#section-3.3.1-3.20.1

Payload Protocol Identifier: 32 bits (unsigned integer)
This value represents an application (or upper layer) specified protocol identifier. This value is passed to SCTP by its upper layer and sent to its peer. This identifier is not used by SCTP but can be used by certain network entities, as well as by the peer application, to identify the type of information being carried in this DATA chunk. This field MUST be sent even in fragmented DATA chunks (to make sure it is available for agents in the middle of the network). Note that this field is not touched by an SCTP implementation; the upper layer is responsible for the host to network byte order conversion of this field.
The value 0 indicates that no application identifier is specified by the upper layer for this payload data.

At present the default value of 0 is being set when the data chunk is formed.

Sample packet capture for one such instance.

image

Pitch

If such an option was there, we could directly implement protocols that require specific ppid with the standard socket library (without having to depend on 3rd party bindings of SCTP C library).
Say for example the NGAP protocol used in 5G which uses

SCTP (IETF RFC 4960 [2]) shall be supported as the transport layer of NG-C signaling bearer. The Payload Protocol
Identifier (ppid) assigned by IANA to be used by SCTP for the application layer protocol NGAP is 60, and 66 for
DTLS over SCTP (IETF RFC 6083 [8])

Vorherrschende Sprache
Python
Sterne
77.2k
Forks
36k
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
558

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python/cpython

Alle Issues in python/cpython

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.