Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Manual: Update usrsctp_init() documentation #715

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ All system calls start with the prefix `usrsctp_` to distinguish them from the k
Every application has to start with `usrsctp_init()`. This function calls `sctp_init()` and reserves the memory necessary to administer the data transfer. The function prototype is

```c
void usrsctp_init(uint16_t udp_port)
void usrsctp_init(uint16_t udp_port,
int (*conn_output)(void *addr, void *buffer,
size_t length, uint8_t tos, uint8_t set_df),
void (*debug_printf)(const char *format, ...))
```

As it is not always possible to send data directly over SCTP because not all NAT boxes can process SCTP packets, the data can be sent over UDP. To encapsulate SCTP into UDP a UDP port has to be specified, to which the datagrams can be sent. This local UDP port is set with the parameter `udp_port`. The default value is 9899, the standard UDP encapsulation port. If UDP encapsulation is not necessary, the UDP port has to be set to 0.
Expand Down
5 changes: 4 additions & 1 deletion Manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ \subsubsection{usrsctp\_init()}
The function prototype is
\begin{verbatim}
void
usrsctp_init(uint16_t udp_port)
usrsctp_init(uint16_t udp_port,
int (*conn_output)(void *addr, void *buffer,
size_t length, uint8_t tos, uint8_t set_df),
void (*debug_printf)(const char *format, ...))
\end{verbatim}
As it is not always possible to send data directly over SCTP because not all NAT boxes can
process SCTP packets, the data can be sent over UDP. To encapsulate SCTP into UDP
Expand Down