python / python/cpython

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

Ouverte
#99,286 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

stdlib topic-socket type-feature
Langage dominant
Python
Étoiles
77.2k
Forks
36k
Métriques de merge des PR
Métriques de PR en attente

Description

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])

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par les points d’entrée standard socket.socket(..., IPPROTO_SCTP) et send(bytes, flags) décrits dans l’issue, puis lisez les exigences de PPID référencées dans RFC 9260. Déterminez comment l’API de sockets standard pourrait accepter un PPID et vérifiez que le chunk SCTP DATA qui en résulte le transporte, y compris les valeurs NGAP mentionnées. Aucun fichier source ni test n’est identifié dans l’issue.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
networking
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.