idnits 2.17.1 draft-dreibholz-taps-neat-socketapi-10.txt: -(1645): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding -(1661): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding -(1670): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There are 13 instances of lines with non-ascii characters in the document. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (9 February 2022) is 807 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Outdated reference: A later version (-01) exists of draft-fairhurst-taps-neat-00 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group T. Dreibholz 3 Internet-Draft SimulaMet 4 Intended status: Experimental 9 February 2022 5 Expires: 13 August 2022 7 NEAT Sockets API 8 draft-dreibholz-taps-neat-socketapi-10 10 Abstract 12 This document describes a BSD Sockets-like API on top of the 13 callback-based NEAT User API. This facilitates porting existing 14 applications to use a subset of NEAT's functionality. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at https://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on 13 August 2022. 33 Copyright Notice 35 Copyright (c) 2022 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 40 license-info) in effect on the date of publication of this document. 41 Please review these documents carefully, as they describe your rights 42 and restrictions with respect to this document. Code Components 43 extracted from this document must include Simplified BSD License text 44 as described in Section 4.e of the Trust Legal Provisions and are 45 provided without warranty as described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 50 1.1. Conventions . . . . . . . . . . . . . . . . . . . . . . . 4 51 2. Initialisation and Clean-Up . . . . . . . . . . . . . . . . . 4 52 2.1. nsa_init() . . . . . . . . . . . . . . . . . . . . . . . 4 53 2.2. nsa_cleanup() . . . . . . . . . . . . . . . . . . . . . . 4 54 2.3. nsa_map_socket() . . . . . . . . . . . . . . . . . . . . 5 55 2.4. nsa_unmap_socket() . . . . . . . . . . . . . . . . . . . 5 56 3. Connection Establishment and Teardown . . . . . . . . . . . . 5 57 3.1. nsa_socket() . . . . . . . . . . . . . . . . . . . . . . 5 58 3.2. nsa_socketpair() . . . . . . . . . . . . . . . . . . . . 6 59 3.3. nsa_close() . . . . . . . . . . . . . . . . . . . . . . . 6 60 3.4. nsa_fcntl() . . . . . . . . . . . . . . . . . . . . . . . 7 61 3.5. nsa_bind() . . . . . . . . . . . . . . . . . . . . . . . 7 62 3.6. nsa_bindx() . . . . . . . . . . . . . . . . . . . . . . . 8 63 3.7. nsa_bindn() . . . . . . . . . . . . . . . . . . . . . . . 9 64 3.8. nsa_connect() . . . . . . . . . . . . . . . . . . . . . . 9 65 3.9. nsa_connectx() . . . . . . . . . . . . . . . . . . . . . 10 66 3.10. nsa_connectn() . . . . . . . . . . . . . . . . . . . . . 11 67 3.11. nsa_listen() . . . . . . . . . . . . . . . . . . . . . . 11 68 3.12. nsa_accept() . . . . . . . . . . . . . . . . . . . . . . 12 69 3.13. nsa_accept4() . . . . . . . . . . . . . . . . . . . . . . 12 70 3.14. nsa_shutdown() . . . . . . . . . . . . . . . . . . . . . 13 71 4. Options Handling . . . . . . . . . . . . . . . . . . . . . . 13 72 4.1. nsa_getsockopt() . . . . . . . . . . . . . . . . . . . . 13 73 4.2. nsa_setsockopt() . . . . . . . . . . . . . . . . . . . . 14 74 4.3. nsa_opt_info() . . . . . . . . . . . . . . . . . . . . . 14 75 5. Security . . . . . . . . . . . . . . . . . . . . . . . . . . 15 76 5.1. nsa_set_secure_identity() . . . . . . . . . . . . . . . . 15 77 5.2. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 78 6. Input/Output Handling . . . . . . . . . . . . . . . . . . . . 15 79 6.1. nsa_write() . . . . . . . . . . . . . . . . . . . . . . . 15 80 6.2. nsa_writev() . . . . . . . . . . . . . . . . . . . . . . 16 81 6.3. nsa_pwrite() . . . . . . . . . . . . . . . . . . . . . . 16 82 6.4. nsa_pwrite64() . . . . . . . . . . . . . . . . . . . . . 16 83 6.5. nsa_pwritev() . . . . . . . . . . . . . . . . . . . . . . 17 84 6.6. nsa_pwritev64() . . . . . . . . . . . . . . . . . . . . . 17 85 6.7. nsa_send() . . . . . . . . . . . . . . . . . . . . . . . 17 86 6.8. nsa_sendto() . . . . . . . . . . . . . . . . . . . . . . 18 87 6.9. nsa_sendmsg() . . . . . . . . . . . . . . . . . . . . . . 18 88 6.10. nsa_sendv() . . . . . . . . . . . . . . . . . . . . . . . 19 89 6.11. nsa_read() . . . . . . . . . . . . . . . . . . . . . . . 20 90 6.12. nsa_readv() . . . . . . . . . . . . . . . . . . . . . . . 20 91 6.13. nsa_pread() . . . . . . . . . . . . . . . . . . . . . . . 21 92 6.14. nsa_pread64() . . . . . . . . . . . . . . . . . . . . . . 21 93 6.15. nsa_preadv() . . . . . . . . . . . . . . . . . . . . . . 21 94 6.16. nsa_preadv64() . . . . . . . . . . . . . . . . . . . . . 21 95 6.17. nsa_recv() . . . . . . . . . . . . . . . . . . . . . . . 22 96 6.18. nsa_recvfrom() . . . . . . . . . . . . . . . . . . . . . 22 97 6.19. nsa_recvmsg() . . . . . . . . . . . . . . . . . . . . . . 23 98 6.20. nsa_recvv() . . . . . . . . . . . . . . . . . . . . . . . 23 99 7. Poll and Select . . . . . . . . . . . . . . . . . . . . . . . 24 100 7.1. nsa_poll() . . . . . . . . . . . . . . . . . . . . . . . 24 101 7.2. nsa_select() . . . . . . . . . . . . . . . . . . . . . . 25 102 8. Address Handling . . . . . . . . . . . . . . . . . . . . . . 25 103 8.1. nsa_getsockname() . . . . . . . . . . . . . . . . . . . . 25 104 8.2. nsa_getpeername() . . . . . . . . . . . . . . . . . . . . 26 105 8.3. nsa_getladdrs() . . . . . . . . . . . . . . . . . . . . . 26 106 8.4. nsa_freeladdrs() . . . . . . . . . . . . . . . . . . . . 27 107 8.5. nsa_getpaddrs() . . . . . . . . . . . . . . . . . . . . . 27 108 8.6. nsa_freepaddrs() . . . . . . . . . . . . . . . . . . . . 28 109 9. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . 28 110 9.1. nsa_open() . . . . . . . . . . . . . . . . . . . . . . . 28 111 9.2. nsa_creat() . . . . . . . . . . . . . . . . . . . . . . . 28 112 9.3. nsa_lockf() . . . . . . . . . . . . . . . . . . . . . . . 28 113 9.4. nsa_lockf64() . . . . . . . . . . . . . . . . . . . . . . 29 114 9.5. nsa_flock() . . . . . . . . . . . . . . . . . . . . . . . 29 115 9.6. nsa_fstat() . . . . . . . . . . . . . . . . . . . . . . . 29 116 9.7. nsa_fpathconf() . . . . . . . . . . . . . . . . . . . . . 29 117 9.8. nsa_fchown() . . . . . . . . . . . . . . . . . . . . . . 30 118 9.9. nsa_fsync() . . . . . . . . . . . . . . . . . . . . . . . 30 119 9.10. nsa_fdatasync() . . . . . . . . . . . . . . . . . . . . . 30 120 9.11. nsa_syncfs() . . . . . . . . . . . . . . . . . . . . . . 30 121 9.12. nsa_dup2() . . . . . . . . . . . . . . . . . . . . . . . 30 122 9.13. nsa_dup3() . . . . . . . . . . . . . . . . . . . . . . . 31 123 9.14. nsa_dup() . . . . . . . . . . . . . . . . . . . . . . . . 31 124 9.15. nsa_lseek() . . . . . . . . . . . . . . . . . . . . . . . 31 125 9.16. nsa_lseek64() . . . . . . . . . . . . . . . . . . . . . . 31 126 9.17. nsa_truncate() . . . . . . . . . . . . . . . . . . . . . 32 127 9.18. nsa_truncate64() . . . . . . . . . . . . . . . . . . . . 32 128 9.19. nsa_pipe() . . . . . . . . . . . . . . . . . . . . . . . 32 129 9.20. nsa_ioctl() . . . . . . . . . . . . . . . . . . . . . . . 32 130 10. Code Examples . . . . . . . . . . . . . . . . . . . . . . . . 33 131 11. Testbed Platform . . . . . . . . . . . . . . . . . . . . . . 33 132 12. Security Considerations . . . . . . . . . . . . . . . . . . . 33 133 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 134 14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 33 135 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 136 15.1. Normative References . . . . . . . . . . . . . . . . . . 33 137 15.2. Informative References . . . . . . . . . . . . . . . . . 34 138 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 36 140 1. Introduction 142 The NEAT project [12], [13], [5], [3], [8] wants to achieve a 143 complete redesign of the way in which Internet applications interact 144 with the network. Our goal is to allow network "services" offered to 145 applications - such as reliability, low-delay communication or 146 security - to be dynamically tailored based on application demands, 147 current network conditions, hardware capabilities or local policies, 148 and also to support the integration of new network functionality in 149 an evolutionary fashion. 151 This document describes the NEAT Sockets API on top of the callback- 152 based NEAT User API [4]. It provides a BSD Sockets-like API that 153 facilitates porting existing applications to use a subset of NEAT's 154 functionality. For further information on NEAT, see also [12], [13], 155 [14], [15], [16]. 157 1.1. Conventions 159 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 160 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 161 document are to be interpreted as described in [1]. 163 2. Initialisation and Clean-Up 165 2.1. nsa_init() 167 nsa_init() is used to explicitly initialise the NEAT Sockets API. In 168 the usual case, however, the NEAT Sockets API is automatically 169 initialized when creating a NEAT socket. Explicit initialisation may 170 only be necessary in a multi-threaded program, in order to avoid 171 parallel initialisation calls. 173 Function Prototype: 175 int nsa_init() 177 Return Value: 179 nsa_init() returns the new NEAT socket descriptor, or -1 in case of 180 error. The error code will be set in the errno variable. 182 2.2. nsa_cleanup() 184 nsa_cleanup() is used to free all resources allocated by NEAT. Note, 185 that the NEAT Sockets API is automatically initialized when creating 186 a NEAT socket. 188 Function Prototype: 190 void nsa_cleanup() 192 2.3. nsa_map_socket() 194 nsa_map_socket() is used to map a system socket descriptor into the 195 NEAT socket descriptor space. This is useful for using NEAT API 196 functions as wrapper to calls on non-NEAT sockets. Mapped socket 197 descriptors can be unmapped by using nsa_unmap_socket(). 199 Function Prototype: 201 int nsa_map_socket(int systemSD, int neatSD) 203 Arguments: 205 systemSD: System socket descriptor. 207 neatSD: Desired NEAT socket descriptor; -1 for automatic allocation. 209 Return Value: 211 nsa_map_socket() returns the new NEAT socket descriptor, or -1 in 212 case of error. The error code will be set in the errno variable. 214 2.4. nsa_unmap_socket() 216 nsa_unmap_socket() is used to unmap a system socket descriptor from 217 the NEAT socket descriptor space. 219 Function Prototype: 221 int nsa_unmap_socket(int neatSD) 223 Arguments: 225 neatSD: NEAT socket descriptor. 227 3. Connection Establishment and Teardown 229 3.1. nsa_socket() 231 nsa_socket() creates a new NEAT socket. The NEAT socket can either 232 be a wrapper around the NEAT User API (if properties are specified) 233 or be a wrapper around a system socket (if no properties are 234 specified). 236 Function Prototype: 238 int nsa_socket(int domain, int type, int protocol, 239 const char* properties) 241 Arguments: 243 domain: Domain for system socket (e.g. AF_INET). 245 type: Type for system socket (SOCK_SEQPACKET). 247 protocol: Protocol for system socket (IPPROTO_SCTP). 249 properties: Properties for NEAT Core socket. 251 Return Value: 253 nsa_socket() returns the NEAT socket descriptor in case of success, 254 or -1 in case of error. The error code will be set in the errno 255 variable. 257 See the socket() documentation for details. 259 3.2. nsa_socketpair() 261 nsa_socketpair() is a wrapper around the socketpair() call, returning 262 NEAT socket descriptors instead. Note, that socketpair() only 263 supports AF_UNIX sockets, i.e. this function is just a wrapper for 264 the system function. 266 Function Prototype: 268 int nsa_socketpair(int domain, int type, int protocol, 269 const char* properties) 271 See the socketpair() documentation for details. 273 3.3. nsa_close() 275 nsa_close() closes a given NEAT socket. 277 Function Prototype: 279 int nsa_close(int sockfd) 281 Arguments: 283 sockfd: NEAT socket descriptor. 285 nsa_close() returns 0 in case of success, or -1 in case of error. 286 The error code will be set in the errno variable. 288 See the close() documentation for details. 290 3.4. nsa_fcntl() 292 nsa_fcntl() manipulates a given NEAT socket. 294 Function Prototype: 296 int nsa_fcntl(int sockfd, int cmd, ...) 298 Arguments: 300 sockfd: NEAT socket descriptor. 302 cmd: Command. 304 ...: Command-specific arguments. 306 nsa_fcntl() returns a command-specific value. 308 For NEAT sockets, the following commands are specified: 310 F_GETFL: Obtain value of the socket descriptor status flags. For 311 NEAT sockets, the flag O_NONBLOCK specifies whether the socket is 312 non-blocking. By default, it is blocking (i.e. O_NONBLOCK is not 313 set). 315 F_SETFL: Set value of the socket descriptor status flags. For NEAT 316 sockets, the flag O_NONBLOCK specifies whether the socket is non- 317 blocking. By default, it is blocking (i.e. O_NONBLOCK is not 318 set). F_SETFL can then be used to change the blocking mode. 320 See the fcntl() documentation for details. 322 3.5. nsa_bind() 324 nsa_bind() binds a given NEAT socket to a given address. Note: this 325 function is provided as legacy wrapper, and it is RECOMMENDED to use 326 nsa_bindn() instead. Note further, that nsa_bind() also supports a 327 single address only (i.e. no multi-homing). nsa_bindx() SHOULD be 328 used instead to support multi-homing. 330 Function Prototype: 332 int nsa_bind(int sockfd, 333 const struct sockaddr* addr, socklen_t addrlen, 334 struct neat_tlv* opt, const int optcnt) 336 Arguments: 338 sockfd: NEAT socket descriptor. 340 addr: Address to bind to. 342 addrlen: Length of the address structure "addr". 344 opt: NEAT options (NULL, if there are none). 346 optcnt: Number of NEAT options provided by "opt". 348 nsa_bind() returns 0 in case of success, or -1 in case of error. The 349 error code will be set in the errno variable. 351 See the bind() documentation for details. 353 3.6. nsa_bindx() 355 nsa_bindx() binds a given NEAT socket to a given set of addresses. 356 Note: this function is provided as legacy wrapper, and it is 357 RECOMMENDED to use nsa_bindn() instead. 359 Function Prototype: 361 int nsa_bindx(int sockfd, const struct sockaddr* addrs, int addrcnt, 362 int flags, 363 struct neat_tlv* opt, const int optcnt) 365 Arguments: 367 sockfd: NEAT socket descriptor. 369 addrs: Addresses to bind to. 371 addrcnt: Number of addresses in "addr". 373 flags: Optional flags (0, if there are none). 375 opt: NEAT options (NULL, if there are none). 377 optcnt: Number of NEAT options provided by "opt". 379 nsa_bindx() returns 0 in case of success, or -1 in case of error. 380 The error code will be set in the errno variable. 382 See the sctp_bindx() documentation for details. 384 3.7. nsa_bindn() 386 nsa_bindn() binds a given NEAT socket to a given port. NEAT takes 387 care of handling local addresses. 389 Function Prototype: 391 int nsa_bindn(int sockfd, uint16_t port, int flags, 392 struct neat_tlv* opt, const int optcnt) 394 Arguments: 396 sockfd: NEAT socket descriptor. 398 port: Port number to bind to. 400 flags: Optional flags (0, if there are none). 402 opt: NEAT options (NULL, if there are none). 404 optcnt: Number of NEAT options provided by "opt". 406 nsa_bindn() returns 0 in case of success, or -1 in case of error. 407 The error code will be set in the errno variable. 409 3.8. nsa_connect() 411 nsa_connect() connects a given NEAT socket to a given remote address. 412 Note: this function is provided as legacy wrapper, and it is 413 RECOMMENDED to use nsa_connectn() instead. Note further, that 414 nsa_connect() also supports a single address only (i.e. no multi- 415 homing). nsa_connectx() SHOULD be used instead to support multi- 416 homing. 418 Function Prototype: 420 int nsa_connect(int sockfd, 421 const struct sockaddr* addr, socklen_t addrlen, 422 struct neat_tlv* opt, const int optcnt) 424 Arguments: 426 sockfd: NEAT socket descriptor. 428 addr: Address to connect to. 430 addrlen: Length of the address structure "addr". 432 opt: NEAT options (NULL, if there are none). 434 optcnt: Number of NEAT options provided by "opt". 436 nsa_connect() returns 0 in case of success, or -1 in case of error. 437 The error code will be set in the errno variable. 439 See the connect() documentation for details. 441 3.9. nsa_connectx() 443 nsa_connectx() connects a given NEAT socket to a given set of remote 444 addresses. Note: this function is provided as legacy wrapper, and it 445 is RECOMMENDED to use nsa_connectn() instead. 447 Function Prototype: 449 int nsa_connectx(int sockfd, 450 const struct sockaddr* addrs, int addrcnt, 451 neat_assoc_t* id, 452 struct neat_tlv* opt, const int optcnt) 454 Arguments: 456 sockfd: NEAT socket descriptor. 458 addrs: Addresses to connect to. 460 addrcnt: Number of addresses in "addr". 462 id Pointer to store association ID to (not used yet, use NULL!). 464 opt: NEAT options (NULL, if there are none). 466 optcnt: Number of NEAT options provided by "opt". 468 nsa_connectx() returns 0 in case of success, or -1 in case of error. 469 The error code will be set in the errno variable. 471 See the sctp_connectx() documentation for details. 473 3.10. nsa_connectn() 475 nsa_connectn() connects a given NEAT socket to a given remote name 476 and port. The remote name is resolved by NEAT to corresponding 477 remote addresses. 479 Function Prototype: 481 int nsa_connectn(int sockfd, const char* name, const uint16_t port, 482 neat_assoc_t* id, 483 struct neat_tlv* opt, const int optcnt) 485 Arguments: 487 sockfd: NEAT socket descriptor. 489 name: Remote name to connect to. 491 port: Remote port number to connect to. 493 id Pointer to store association ID to (not used yet, use NULL!). 495 opt: NEAT options (NULL, if there are none). 497 optcnt: Number of NEAT options provided by "opt". 499 nsa_connectn() returns 0 in case of success, or -1 in case of error. 500 The error code will be set in the errno variable. 502 3.11. nsa_listen() 504 nsa_listen() marks a given NEAT socket as listening socket, i.e. 505 accepting incoming connections. 507 Function Prototype: 509 int nsa_listen(int sockfd, int backlog) 511 Arguments: 513 sockfd: NEAT socket descriptor. 515 backlog: Defines the maximum length to which the queue of pending 516 connections for "sockfd" may grow. 518 nsa_listen() returns 0 in case of success, or -1 in case of error. 519 The error code will be set in the errno variable. 521 See the listen() documentation for details. 523 3.12. nsa_accept() 525 nsa_accept() extracts the first connection request in the queue of 526 pending connections for a listening NEAT socket, creates a new 527 connected socket, and returns a new NEAT socket descriptor referring 528 to that socket. 530 Function Prototype: 532 int nsa_accept(int sockfd, struct sockaddr* addr, socklen_t* addrlen) 534 Arguments: 536 sockfd: NEAT socket descriptor. 538 addr: Pointer to storage space to store the peer's primary address 539 to (or NULL, if address is not needed). 541 addrlen: Pointer to variable with size of the storage in "addr" (or 542 NULL, if address is not needed). 544 nsa_accept() returns the new NEAT socket descriptor in case of 545 success, or -1 in case of error. The error code will be set in the 546 errno variable. In case of success, the peer's primary address is 547 stored in "addr", if there is sufficient space. The variable pointer 548 to by "addrlen" will then contain the actual address size. 550 See the accept() documentation for details. 552 3.13. nsa_accept4() 554 nsa_accept4() extracts the first connection request in the queue of 555 pending connections for a listening NEAT socket, creates a new 556 connected socket, and returns a new NEAT socket descriptor referring 557 to that socket. If successful, and flags!=0, nsa_accept4() 558 furthermore makes the new socket non-blocking (SOCK_NONBLOCK flag) 559 and/or close-on-exec (SOCK_CLOEXEC flag). For flags==0, the 560 behaviour is identical to nsa_accept(). 562 Function Prototype: 564 int nsa_accept4(int sockfd, 565 struct sockaddr* addr, socklen_t* addrlen, 566 int flags) 568 Arguments: 570 sockfd: NEAT socket descriptor. 572 addr: Pointer to storage space to store the peer's primary address 573 to (or NULL, if address is not needed). 575 addrlen: Pointer to variable with size of the storage in "addr" (or 576 NULL, if address is not needed). 578 nsa_accept4() returns the new NEAT socket descriptor in case of 579 success, or -1 in case of error. The error code will be set in the 580 errno variable. In case of success, the peer's primary address is 581 stored in "addr", if there is sufficient space. The variable pointer 582 to by "addrlen" will then contain the actual address size. 584 See the accept() documentation for details. 586 3.14. nsa_shutdown() 588 nsa_shutdown() shuts down the connection of a given NEAT socket. 590 Function Prototype: 592 int nsa_shutdown(int sockfd, int how) 594 Arguments: 596 sockfd: NEAT socket descriptor. 598 how: Not used for NEAT sockets (set to SHUT_RDWR). 600 nsa_shutdown() returns 0 in case of success, or -1 in case of error. 601 The error code will be set in the errno variable. 603 See the shutdown() documentation for details. 605 4. Options Handling 607 4.1. nsa_getsockopt() 609 nsa_getsockopt() gets a socket option of a given NEAT socket. 611 Function Prototype: 613 int nsa_getsockopt(int sockfd, int level, int optname, 614 void* optval, socklen_t* optlen) 616 Arguments: 618 sockfd: NEAT socket descriptor. 620 level: Option level. 622 optname: Option number. 624 optval: Buffer to store option value to. 626 optlen: Pointer to variable with length of the buffer in "optval". 628 nsa_getsockopt() returns 0 in case of success, or -1 in case of 629 error. The error code will be set in the errno variable. 631 See the getsockopt() documentation for details. 633 4.2. nsa_setsockopt() 635 nsa_getsockopt() sets a socket option of a given NEAT socket. 637 Function Prototype: 639 int nsa_setsockopt(int sockfd, int level, int optname, 640 const void* optval, socklen_t optlen) 642 Arguments: 644 sockfd: NEAT socket descriptor. 646 level: Option level. 648 optname: Option number. 650 optval: Buffer with option value to set. 652 optlen: Length of buffer with option value. 654 nsa_setsockopt() returns 0 in case of success, or -1 in case of 655 error. The error code will be set in the errno variable. 657 See the setsockopt() documentation for details. 659 4.3. nsa_opt_info() 661 nsa_opt_info() gets a socket option of a given NEAT socket. 663 Function Prototype: 665 int nsa_opt_info(int sockfd, neat_assoc_t id, 666 int opt, void* arg, socklen_t* size) 668 Arguments: 670 sockfd: NEAT socket descriptor. 672 id: Association identifier (0 in case of 1:1-style sockets). 674 opt: Option number. 676 arg: Buffer to store option value to. 678 size: Pointer to variable with length of the buffer in "arg". 680 nsa_opt_info() returns 0 in case of success, or -1 in case of error. 681 The error code will be set in the errno variable. 683 See the sctp_opt_info() documentation for details. 685 5. Security 687 5.1. nsa_set_secure_identity() 689 TBD. 691 5.2. ... 693 TBD. 695 6. Input/Output Handling 697 6.1. nsa_write() 699 nsa_write() sends data over a given connected NEAT socket. For NEAT 700 sockets, nsa_write() is equal to nsa_send() with "flags" set to 0. 702 Function Prototype: 704 ssize_t nsa_write(int fd, const void* buf, size_t len) 706 Arguments: 708 fd: NEAT socket descriptor. 710 buf: Data to send. 712 len: Length of data to send. 714 nsa_write() returns the number of sent bytes in case of success, or 715 -1 in case of error. The error code will be set in the errno 716 variable. 718 See the write() documentation for details. 720 6.2. nsa_writev() 722 nsa_writev() sends data over a given connected NEAT socket. The data 723 is provided by an iovec structure. 725 Function Prototype: 727 ssize_t nsa_writev(int fd, const struct iovec* iov, int iovcnt) 729 Arguments: 731 sockfd: NEAT socket descriptor. 733 iov: Data to send provided as iovec structures. 735 iovcnt: Number of provided iovec structures. 737 nsa_writev() returns the number of sent bytes in case of success, or 738 -1 in case of error. The error code will be set in the errno 739 variable. 741 See the writev() documentation for details. 743 6.3. nsa_pwrite() 745 nsa_pwrite() is a wrapper around the pwrite() call, using a NEAT 746 socket descriptor instead. 748 Function Prototype: 750 ssize_t nsa_pwrite(int fd, const void* buf, size_t len, off_t offset) 752 See the pwrite() documentation for details. 754 6.4. nsa_pwrite64() 756 nsa_pwrite64() is a wrapper around the pwrite64() call, using a NEAT 757 socket descriptor instead. 759 Function Prototype: 761 ssize_t nsa_pwrite(int fd, const void* buf, size_t len, 762 off64_t offset) 764 See the pwrite64() documentation for details. 766 6.5. nsa_pwritev() 768 nsa_pwritev() is a wrapper around the pwritev() call, using a NEAT 769 socket descriptor instead. 771 Function Prototype: 773 ssize_t nsa_pwritev(int fd, const struct iovec* iov, int iovcnt, 774 off_t offset) 776 See the pwritev() documentation for details. 778 6.6. nsa_pwritev64() 780 nsa_pwritev64() is a wrapper around the pwritev64() call, using a 781 NEAT socket descriptor instead. 783 Function Prototype: 785 ssize_t nsa_pwritev(int fd, const struct iovec* iov, int iovcnt, 786 off64_t offset) 788 See the pwritev64() documentation for details. 790 6.7. nsa_send() 792 nsa_send() sends data over a given connected NEAT socket. 794 Function Prototype: 796 ssize_t nsa_send(int sockfd, const void* buf, size_t len, int flags) 798 Arguments: 800 sockfd: NEAT socket descriptor. 802 buf: Data to send. 804 len: Length of data to send. 806 flags: Optional flags (0, if there are none). 808 nsa_send() returns the number of sent bytes in case of success, or -1 809 in case of error. The error code will be set in the errno variable. 811 See the send() documentation for details. 813 6.8. nsa_sendto() 815 nsa_sendto() is a wrapper around the sendto() call, using NEAT socket 816 descriptors instead. Note: this function is provided as legacy 817 wrapper, and it is RECOMMENDED to use nsa_send() instead. On NEAT 818 sockets, a provided destination address is ignored. 820 Function Prototype: 822 ssize_t nsa_sendto(int sockfd, const void* buf, size_t len, 823 int flags, 824 const struct sockaddr* to, socklen_t tolen) 826 Arguments: 828 sockfd: NEAT socket descriptor. 830 buf: Data to send. 832 len: Length of data to send. 834 flags: Optional flags (0, if there are none). 836 to: Address to send data to (ignored for NEAT sockets). 838 tolen: Length of address to send data to (ignored for NEAT sockets). 840 nsa_sendto() returns the number of sent bytes in case of success, or 841 -1 in case of error. The error code will be set in the errno 842 variable. 844 See the send() documentation for details. 846 6.9. nsa_sendmsg() 848 nsa_sendmsg() sends data over a given connected NEAT socket. The 849 data and control information is provided by a msghdr structure. On 850 NEAT sockets, a provided destination address is ignored. 852 Function Prototype: 854 ssize_t nsa_sendmsg(int sockfd, const struct msghdr* msg, int flags) 855 Arguments: 857 sockfd: NEAT socket descriptor. 859 msg: Data to send and corresponding control information as msghdr 860 structure. 862 flags: Optional flags (0, if there are none). 864 nsa_sendmsg() returns the number of sent bytes in case of success, or 865 -1 in case of error. The error code will be set in the errno 866 variable. 868 See the sendmsg() documentation for details. 870 6.10. nsa_sendv() 872 nsa_sendv() sends data over a given connected NEAT socket. The data 873 and control information is provided by iovec and info structures. On 874 NEAT sockets, a provided destination address is ignored. 876 Function Prototype: 878 ssize_t nsa_sendv(int sockfd, struct iovec* iov, int iovcnt, 879 struct sockaddr* to, int tocnt, 880 void* info, socklen_t infolen, 881 unsigned int infotype, int flags) 883 Arguments: 885 sockfd: NEAT socket descriptor. 887 iov: Data to send provided as iovec structures. 889 iovcnt: Number of provided iovec structures. 891 to: Address(es) to send data to (ignored for NEAT sockets). 893 tocnt: Number of of addresses to send data to (ignored for NEAT 894 sockets). 896 info: Control information. 898 infolen: Length of control information. 900 infotype: Type of control information. 902 flags: Optional flags (0, if there are none). 904 nsa_sendv() returns the number of sent bytes in case of success, or 905 -1 in case of error. The error code will be set in the errno 906 variable. 908 See the sctp_sendv() documentation for details. 910 6.11. nsa_read() 912 nsa_read() reads data from a given connected NEAT socket. For NEAT 913 sockets, nsa_read() is equal to nsa_recv() with "flags" set to 0. 915 Function Prototype: 917 ssize_t nsa_read(int fd, void* buf, size_t len) 919 Arguments: 921 fd: NEAT socket descriptor. 923 buf: Buffer to store read data to. 925 len: Length of the storage buffer. 927 nsa_read() returns the number of read bytes in case of success, 0 in 928 case of connection shutdown, or -1 in case of error. The error code 929 will be set in the errno variable. 931 See the read() documentation for details. 933 6.12. nsa_readv() 935 nsa_readv() reads data from a given connected NEAT socket. The data 936 information buffers are provided by an iovec structure. 938 Function Prototype: 940 ssize_t nsa_readv(int fd, const struct iovec* iov, int iovcnt) 942 Arguments: 944 fd: NEAT socket descriptor. 946 iov: Data to send provided as iovec structures. 948 iovcnt: Number of provided iovec structures. 950 nsa_readv() returns the number of read bytes in case of success, 0 in 951 case of connection shutdown, or -1 in case of error. The error code 952 will be set in the errno variable. 954 See the readv() documentation for details. 956 6.13. nsa_pread() 958 nsa_pread() is a wrapper around the pread() call, using a NEAT socket 959 descriptor instead. 961 Function Prototype: 963 ssize_t nsa_pread(int fd, void* buf, size_t len, off_t offset) 965 See the pread() documentation for details. 967 6.14. nsa_pread64() 969 nsa_pread64() is a wrapper around the pread64() call, using a NEAT 970 socket descriptor instead. 972 Function Prototype: 974 ssize_t nsa_pread(int fd, void* buf, size_t len, off_t offset) 976 See the pread64() documentation for details. 978 6.15. nsa_preadv() 980 nsa_preadv() is a wrapper around the preadv() call, using a NEAT 981 socket descriptor instead. 983 Function Prototype: 985 ssize_t nsa_preadv(int fd, const struct iovec* iov, int iovcnt, 986 off64_t offset) 988 See the preadv() documentation for details. 990 6.16. nsa_preadv64() 992 nsa_preadv64() is a wrapper around the preadv64() call, using a NEAT 993 socket descriptor instead. 995 Function Prototype: 997 ssize_t nsa_preadv(int fd, const struct iovec* iov, int iovcnt, 998 off64_t offset) 1000 See the preadv64() documentation for details. 1002 6.17. nsa_recv() 1004 nsa_recv() reads data from a given connected NEAT socket. 1006 Function Prototype: 1008 ssize_t nsa_recv(int sockfd, void* buf, size_t len, int flags) 1010 Arguments: 1012 sockfd: NEAT socket descriptor. 1014 buf: Buffer to store read data to. 1016 len: Length of the storage buffer. 1018 flags: Optional flags (0, if there are none). 1020 nsa_recv() returns the number of read bytes in case of success, 0 in 1021 case of connection shutdown, or -1 in case of error. The error code 1022 will be set in the errno variable. 1024 See the recv() documentation for details. 1026 6.18. nsa_recvfrom() 1028 nsa_recvfrom() reads data from a given connected NEAT socket. The 1029 peer's sending address of the data (if possible and useful for 1030 underlying transport protocol) is obtained as well. Note: this 1031 function is provided as legacy wrapper, and it is RECOMMENDED to use 1032 nsa_recv() instead. 1034 Function Prototype: 1036 ssize_t nsa_recvfrom(int sockfd, void* buf, size_t len, int flags, 1037 struct sockaddr* from, socklen_t* fromlen) 1039 sockfd: NEAT socket descriptor. 1041 buf: Buffer to store read data to. 1043 len: Length of the storage buffer. 1045 flags: Optional flags (0, if there are none). 1047 from: Pointer to storage space to store the peer's primary address 1048 to (or NULL, if address is not needed). 1050 fromlen: Pointer to variable with size of the storage in "from" (or 1051 NULL, if address is not needed). 1053 nsa_recvfrom() returns the number of read bytes in case of success, 0 1054 in case of connection shutdown, or -1 in case of error. The error 1055 code will be set in the errno variable. In case of success, the 1056 peer's sending address (if possible and useful for underlying 1057 transport protocol) may be stored in "from", if there is sufficient 1058 space. The variable pointer to by "fromlen" will then contain the 1059 actual address size. 1061 See the recvfrom() documentation for details. 1063 6.19. nsa_recvmsg() 1065 nsa_recvmsg() reads data from a given connected NEAT socket. The 1066 data and control information buffers are provided by a msghdr 1067 structure. 1069 Function Prototype: 1071 ssize_t nsa_recvmsg(int sockfd, struct msghdr* msg, int flags) 1073 Arguments: 1075 sockfd: NEAT socket descriptor. 1077 msg: Data to send and corresponding control information as msghdr 1078 structure. 1080 flags: Optional flags (0, if there are none). 1082 nsa_recvmsg() returns the number of read bytes in case of success, 0 1083 in case of connection shutdown, or -1 in case of error. The error 1084 code will be set in the errno variable. 1086 See the recvmsg() documentation for details. 1088 6.20. nsa_recvv() 1090 nsa_recvv() reads data from a given connected NEAT socket. The data 1091 and control information buffers are provided by iovec and info 1092 structures. 1094 Function Prototype: 1096 ssize_t nsa_recvv(int sockfd, struct iovec* iov, int iovcnt, 1097 struct sockaddr* from, socklen_t* fromlen, 1098 void* info, socklen_t* infolen, 1099 unsigned int* infotype, int* msg_flags) 1101 Arguments: 1103 sockfd: NEAT socket descriptor. 1105 iov: Data to send provided as iovec structures. 1107 iovcnt: Number of provided iovec structures. 1109 from: Pointer to storage space to store the peer's primary address 1110 to (or NULL, if address is not needed). 1112 fromlen: Pointer to variable with size of the storage in "from" (or 1113 NULL, if address is not needed). 1115 info: Pointer to storage space for control information. 1117 infolen: Pointer to variable with length of control information. 1119 infotype: Pointer to variable for storing the control information 1120 type to. 1122 flags: Pointer to variable with optional flags. 1124 nsa_recvv() returns the number of sent received in case of success, 1125 or -1 in case of error. The error code will be set in the errno 1126 variable. 1128 See the sctp_recvv() documentation for details. 1130 7. Poll and Select 1132 7.1. nsa_poll() 1134 nsa_poll() waits for activity (input/output/error/...) on a set of 1135 given NEAT sockets. 1137 Function Prototype: 1139 int nsa_poll(struct pollfd* ufds, const nfds_t nfds, int timeout) 1141 Arguments: 1143 ufds: NEAT socket descriptor and requested activity for each NEAT 1144 socket. 1146 nfds: Number of sockets given by "ufds". 1148 timeout: Timeout in milliseconds. 1150 nsa_poll() returns the number of NEAT sockets with activity in case 1151 of success, 0 in case of timeout, or -1 in case of error. The error 1152 code will be set in the errno variable. 1154 See the poll() documentation for details. 1156 7.2. nsa_select() 1158 nsa_select() is a wrapper around the select() call, using NEAT socket 1159 descriptors instead. Note: this function is provided as legacy 1160 wrapper, and it is RECOMMENDED to use nsa_poll() instead. 1162 Function Prototype: 1164 int nsa_select(int n, 1165 fd_set* readfds, fd_set* writefds, fd_set* exceptfds, 1166 struct timeval* timeout) 1168 See the select() documentation for details. 1170 8. Address Handling 1172 8.1. nsa_getsockname() 1174 nsa_getsockname() obtains the first local address of a socket. Note: 1175 this function is provided as legacy wrapper, and it is RECOMMENDED to 1176 use nsa_getladdrs() instead to support multi-homed transport 1177 protocols! 1179 Function Prototype: 1181 int nsa_getsockname(int sockfd, 1182 struct sockaddr* name, socklen_t* namelen) 1184 Arguments: 1186 sockfd: NEAT socket descriptor. 1188 name: Storage space for the address. 1190 namelen: Pointer to variable with the storage space's size. 1192 Return Value: 1194 nsa_getsockname() returns 0 in case of success (with the actual 1195 address size stored into the "namelen" variable), or -1 in case of 1196 error. The error code will be set in the errno variable. 1198 See the getsockname() documentation for details. 1200 8.2. nsa_getpeername() 1202 nsa_getpeername() obtains the first remote address of a connected 1203 socket. Note: this function is provided as legacy wrapper, and it is 1204 RECOMMENDED to use nsa_getpaddrs() instead to support multi-homed 1205 transport protocols! 1207 Function Prototype: 1209 int nsa_getpeername(int sockfd, 1210 struct sockaddr* name, socklen_t* namelen) 1212 Arguments: 1214 sockfd: NEAT socket descriptor. 1216 name: Storage space for the address. 1218 namelen: Pointer to variable with the storage space's size. 1220 Return Value: 1222 nsa_getpeername() returns 0 in case of success (with the actual 1223 address size stored into the "namelen" variable), or -1 in case of 1224 error. The error code will be set in the errno variable. 1226 See the getpeername() documentation for details. 1228 8.3. nsa_getladdrs() 1230 nsa_getladdrs() obtains the local addresses of a socket. The storage 1231 space for the addresses will be automatically allocated and needs to 1232 be freed by nsa_freeladdrs(). 1234 Function Prototype: 1236 int nsa_getladdrs(int sockfd, neat_assoc_t id, 1237 struct sockaddr** addrs) 1239 Arguments: 1241 sockfd: NEAT socket descriptor. 1243 id: Association identifier (0 in case of 1:1-style sockets). 1245 addrs: Pointer to variable to store pointer to addresses to. 1247 nsa_getladdrs() returns the number of addresses stored into a newly 1248 allocated space. The pointer to this space is stored into the 1249 variable provided by "addrs". In case of error, -1 is returned, and 1250 the error code will be set in the errno variable. 1252 8.4. nsa_freeladdrs() 1254 nsa_freeladdrs() frees addresses obtained by nsa_getladdrs(). 1256 Function Prototype: 1258 void nsa_freeladdrs(struct sockaddr* addrs) 1260 Arguments: 1262 addrs: Pointer to addresses to be freed. 1264 8.5. nsa_getpaddrs() 1266 nsa_getpaddrs() obtains the remote addresses of a connected socket. 1267 The storage space for the addresses will be automatically allocated 1268 and needs to be freed by nsa_freepaddrs(). 1270 Function Prototype: 1272 int nsa_getpaddrs(int sockfd, neat_assoc_t id, 1273 struct sockaddr** addrs) 1275 Arguments: 1277 sockfd: NEAT socket descriptor. 1279 id: Association identifier (0 in case of 1:1-style sockets). 1281 addrs: Pointer to variable to store pointer to addresses to. 1283 nsa_getpaddrs() returns the number of addresses stored into a newly 1284 allocated space. The pointer to this space is stored into the 1285 variable provided by "addrs". In case of error, -1 is returned, and 1286 the error code will be set in the errno variable. 1288 8.6. nsa_freepaddrs() 1290 nsa_freepaddrs() frees addresses obtained by nsa_getpaddrs(). 1292 Function Prototype: 1294 void nsa_freepaddrs(struct sockaddr* addrs) 1296 Arguments: 1298 addrs: Pointer to addresses to be freed. 1300 9. Miscellaneous 1302 This section contains miscellaneous wrapper functions, mostly around 1303 file I/O. Since Unix file descriptors are used together with socket 1304 descriptors in functions like poll(), select(), etc., it is necessary 1305 to wrap functions handling file descriptors as well. 1307 9.1. nsa_open() 1309 nsa_open() is a wrapper around the open() call, returning a NEAT 1310 socket descriptor instead. 1312 Function Prototype: 1314 int nsa_open(const char* pathname, int flags, mode_t mode) 1316 See the open() documentation for details. 1318 9.2. nsa_creat() 1320 nsa_creat() is a wrapper around the creat() call, returning a NEAT 1321 socket descriptor instead. 1323 Function Prototype: 1325 int nsa_creat(const char* pathname, mode_t mode) 1327 See the creat() documentation for details. 1329 9.3. nsa_lockf() 1331 nsa_lockf() is a wrapper around the lockf() call, using a NEAT socket 1332 descriptor instead. 1334 Function Prototype: 1336 int nsa_lockf(int fd, int cmd, off_t len) 1338 See the lockf() documentation for details. 1340 9.4. nsa_lockf64() 1342 nsa_lockf64() is a wrapper around the lockf64() call, using a NEAT 1343 socket descriptor instead. 1345 Function Prototype: 1347 int nsa_lockf(int fd, int cmd, off64_t len) 1349 See the lockf64() documentation for details. 1351 9.5. nsa_flock() 1353 nsa_flock() is a wrapper around the flock() call, using a NEAT socket 1354 descriptor instead. 1356 Function Prototype: 1358 int nsa_flock(int fd, int operation) 1360 See the flock() documentation for details. 1362 9.6. nsa_fstat() 1364 nsa_fstat() is a wrapper around the fstat() call, using a NEAT socket 1365 descriptor instead. 1367 Function Prototype: 1369 int nsa_fstat(int fd, struct stat* buf) 1371 See the fstat() documentation for details. 1373 9.7. nsa_fpathconf() 1375 nsa_fpathconf() is a wrapper around the fpathconf() call, using a 1376 NEAT socket descriptor instead. 1378 Function Prototype: 1380 long nsa_fpathconf(int fd, int name) 1382 See the fpathconf() documentation for details. 1384 9.8. nsa_fchown() 1386 nsa_fchown() is a wrapper around the fchown() call, using a NEAT 1387 socket descriptor instead. 1389 Function Prototype: 1391 int nsa_fchown(int fd, uid_t owner, gid_t group) 1393 See the fchown() documentation for details. 1395 9.9. nsa_fsync() 1397 nsa_fsync() is a wrapper around the fsync() call, using a NEAT socket 1398 descriptor instead. 1400 Function Prototype: 1402 int nsa_fsync(int fd) 1404 See the fsync() documentation for details. 1406 9.10. nsa_fdatasync() 1408 nsa_fdatasync() is a wrapper around the fdatasync() call, using a 1409 NEAT socket descriptor instead. 1411 Function Prototype: 1413 int nsa_fdatasync(int fd) 1415 See the fdatasync() documentation for details. 1417 9.11. nsa_syncfs() 1419 nsa_syncfs() is a wrapper around the syncfs() call, using a NEAT 1420 socket descriptor instead. 1422 Function Prototype: 1424 int nsa_syncfs(int fd) 1426 See the syncfs() documentation for details. 1428 9.12. nsa_dup2() 1430 nsa_dup2() is a wrapper around the dup2() call, using a NEAT socket 1431 descriptor instead. 1433 Function Prototype: 1435 int nsa_dup2(int oldfd, int newfd) 1437 See the dup2() documentation for details. 1439 9.13. nsa_dup3() 1441 nsa_dup3() is a wrapper around the dup3() call, using a NEAT socket 1442 descriptor instead. 1444 Function Prototype: 1446 int nsa_dup3(int oldfd, int newfd, int flags) 1448 See the dup3() documentation for details. 1450 9.14. nsa_dup() 1452 nsa_dup() is a wrapper around the dup() call, using a NEAT socket 1453 descriptor instead. 1455 Function Prototype: 1457 int nsa_dup(int oldfd) 1459 See the dup() documentation for details. 1461 9.15. nsa_lseek() 1463 nsa_lseek() is a wrapper around the lseek() call, using a NEAT socket 1464 descriptor instead. 1466 Function Prototype: 1468 off_t nsa_lseek(int fd, off_t offset, int whence) 1470 See the lseek() documentation for details. 1472 9.16. nsa_lseek64() 1474 nsa_lseek64() is a wrapper around the lseek64() call, using a NEAT 1475 socket descriptor instead. 1477 Function Prototype: 1479 off_t nsa_lseek(int fd, off64_t offset, int whence) 1480 See the lseek64() documentation for details. 1482 9.17. nsa_truncate() 1484 nsa_truncate() is a wrapper around the truncate() call, using a NEAT 1485 socket descriptor instead. 1487 Function Prototype: 1489 int nsa_ftruncate(int fd, off_t length) 1491 See the truncate() documentation for details. 1493 9.18. nsa_truncate64() 1495 nsa_truncate64() is a wrapper around the truncate64() call, using a 1496 NEAT socket descriptor instead. 1498 Function Prototype: 1500 int nsa_ftruncate(int fd, off64_t length) 1502 See the truncate64() documentation for details. 1504 9.19. nsa_pipe() 1506 nsa_pipe() is a wrapper around the pipe() call, returning NEAT socket 1507 descriptors instead. 1509 Function Prototype: 1511 int nsa_pipe(int fds[2]) 1513 See the pipe() documentation for details. 1515 9.20. nsa_ioctl() 1517 nsa_ioctl() is a wrapper around the ioctl() call, using a NEAT socket 1518 descriptor instead. 1520 Function Prototype: 1522 int nsa_ioctl(int fd, int request, const void* argp) 1524 See the ioctl() documentation for details. 1526 10. Code Examples 1528 Running code examples can be found in the NEAT Git repository, with 1529 some tutorial material in [10], [11]: 1531 URL: https://github.com/NEAT-project/neat (https://github.com/ 1532 NEAT-project/neat) 1534 Branch: dreibh/neat-socketapi (https://github.com/NEAT- 1535 project/neat/tree/dreibh/neat-socketapi) 1537 Directory: socketapi/examples/ (https://github.com/NEAT- 1538 project/neat/tree/dreibh/neat-socketapi/socketapi/examples) 1540 11. Testbed Platform 1542 A large-scale and realistic Internet testbed platform with support 1543 for the multi-homing feature of the underlying SCTP and MPTCP 1544 protocols is NorNet. A description of NorNet is provided in [6], 1545 [7], some further information can be found on the project website 1546 [9]. 1548 12. Security Considerations 1550 Security considerations for the SCTP sockets API are described in 1551 [2]. 1553 13. IANA Considerations 1555 This document does not require IANA actions. 1557 14. Acknowledgments 1559 This work was partially funded by the European Union's Horizon 2020 1560 research and innovation programme under grant agreement No. 644334 1561 (NEAT). The views expressed are solely those of the author(s). 1563 The author would like to thank David Ros, Michael Welzl, and Xing 1564 Zhou for their support. 1566 15. References 1568 15.1. Normative References 1570 [1] Bradner, S., "Key words for use in RFCs to Indicate 1571 Requirement Levels", BCP 14, RFC 2119, 1572 DOI 10.17487/RFC2119, March 1997, 1573 . 1575 [2] Stewart, R., Tuexen, M., Poon, K., Lei, P., and V. 1576 Yasevich, "Sockets API Extensions for the Stream Control 1577 Transmission Protocol (SCTP)", RFC 6458, 1578 DOI 10.17487/RFC6458, December 2011, 1579 . 1581 [3] Gjessing, S. and M. Welzl, "A Minimal Set of Transport 1582 Services for TAPS Systems", Work in Progress, Internet- 1583 Draft, draft-gjessing-taps-minset-05, 20 June 2017, 1584 . 1587 [4] Fairhurst, G., "The NEAT Interface to Transport Services", 1588 Work in Progress, Internet-Draft, draft-fairhurst-taps- 1589 neat-00, 30 October 2017, . 1592 [5] Welzl, M., Tuexen, M., and N. Khademi, "On the Usage of 1593 Transport Features Provided by IETF Transport Protocols", 1594 Work in Progress, Internet-Draft, draft-ietf-taps- 1595 transports-usage-09, 26 October 2017, 1596 . 1599 15.2. Informative References 1601 [6] Dreibholz, T., "NorNet - Building an Inter-Continental 1602 Internet Testbed based on Open Source Software", 1603 Proceedings of the LinuxCon Europe, 5 October 2016, 1604 . 1607 [7] Gran, E. G., Dreibholz, T., and A. Kvalbein, "NorNet Core 1608 - A Multi-Homed Research Testbed", Computer Networks, 1609 Special Issue on Future Internet Testbeds Volume 61, Pages 1610 75-87, ISSN 1389-1286, DOI 10.1016/j.bjp.2013.12.035, 14 1611 March 2014, 1612 . 1614 [8] Dreibholz, T., "NEAT - A New, Evolutive API and Transport- 1615 Layer Architecture for the Internet", 1616 Online: https://www.neat-project.org/, 2022, 1617 . 1619 [9] Dreibholz, T., "NorNet - A Real-World, Large-Scale Multi- 1620 Homing Testbed", Online: https://www.nntb.no/, 2022, 1621 . 1623 [10] Dreibholz, T., "NEAT Tutorial at Hainan University: 1624 Getting Started with NEAT", Invited Talk at Hainan 1625 University, College of Information Science and 1626 Technology (CIST), 18 December 2017, 1627 . 1630 [11] Dreibholz, T., "A Practical Introduction to NEAT at Hainan 1631 University", Invited Talk at Hainan University, College of 1632 Information Science and Technology (CIST), 17 April 2017, 1633 . 1636 [12] Weinrank, F., Grinnemo, K., Bozakov, Z., Brunström, A., 1637 Dreibholz, T., Hurtig, P., Khademi, N., and M. Tüxen, "A 1638 NEAT Way to Browse the Web", Proceedings of the ACM, IRTF 1639 and ISOC Applied Networking Research Workshop (ANRW) Pages 1640 33-34, ISBN 978-1-4503-5108-9, 1641 DOI 10.1145/3106328.3106335, 15 July 2017, 1642 . 1644 [13] Fairhurst, G., Jones, T., Bozakov, Z., Brunström, A., 1645 Damjanović, D., Eckert, K. R. E. T., Grinnemo, K., Hansen, 1646 A. F., Khademi, N., Mangiante, S., McManus, P., 1647 Papastergiou, G., Ros, D., Tüxen, M., Vyncke, E., and M. 1648 Welzl, "NEAT Architecture", Number D1.1, 1 December 2015, 1649 . 1652 [14] Welzl, M., Damjanović, D., Fairhurst, G., Hayes, D., 1653 Jones, T., Ros, D., Tüxen, M., and F. Weinrank, "Final 1654 Version of Services and APIs", Deliverable D1.3, 30 1655 October 2017, . 1658 [15] Khademi, N., Bozakov, Z., Brunström, A., Dale, Ø., 1659 Damjanović, D., Evensen, K. R., Fairhurst, G., Grinnemo, 1660 K., Jones, T., Mangiante, S., Petlund, A., Ros, D., 1661 Stenberg, D., Tüxen, M., Weinrank, F., and M. Welzl, "NEAT 1662 - Core Transport System, with both Low-level and High- 1663 level Components", Number D2.2, 14 March 2017, 1664 . 1667 [16] Khademi, N., Bozakov, Z., Brunström, A., Dale, Ø., 1668 Damjanović, D., Evensen, K. R., Fairhurst, G., Fischer, 1669 A., Grinnemo, K., Jones, T., Mangiante, S., Petlund, A., 1670 Ros, D., Rüngeler, I., Stenberg, D., Tüxen, M., Weinrank, 1671 F., and M. Welzl, "Final Version of Core Transport 1672 System", Deliverable D2.3, 31 August 2017, 1673 . 1676 Author's Address 1678 Thomas Dreibholz 1679 Simula Metropolitan Centre for Digital Engineering 1680 Pilestredet 52 1681 0167 Oslo 1682 Norway 1684 Phone: +47-6782-8200 1685 Email: dreibh@simula.no 1686 URI: https://www.simula.no/people/dreibh