idnits 2.17.1 draft-dreibholz-taps-neat-socketapi-08.txt: 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: ---------------------------------------------------------------------------- No issues found here. 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 (February 2, 2021) is 1172 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 (~~), 2 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 February 2, 2021 5 Expires: August 6, 2021 7 NEAT Sockets API 8 draft-dreibholz-taps-neat-socketapi-08 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 August 6, 2021. 33 Copyright Notice 35 Copyright (c) 2021 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 40 (https://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 51 1.1. Conventions . . . . . . . . . . . . . . . . . . . . . . . 4 52 2. Initialisation and Clean-Up . . . . . . . . . . . . . . . . . 4 53 2.1. nsa_init() . . . . . . . . . . . . . . . . . . . . . . . 4 54 2.2. nsa_cleanup() . . . . . . . . . . . . . . . . . . . . . . 4 55 2.3. nsa_map_socket() . . . . . . . . . . . . . . . . . . . . 5 56 2.4. nsa_unmap_socket() . . . . . . . . . . . . . . . . . . . 5 57 3. Connection Establishment and Teardown . . . . . . . . . . . . 5 58 3.1. nsa_socket() . . . . . . . . . . . . . . . . . . . . . . 5 59 3.2. nsa_socketpair() . . . . . . . . . . . . . . . . . . . . 6 60 3.3. nsa_close() . . . . . . . . . . . . . . . . . . . . . . . 6 61 3.4. nsa_fcntl() . . . . . . . . . . . . . . . . . . . . . . . 7 62 3.5. nsa_bind() . . . . . . . . . . . . . . . . . . . . . . . 7 63 3.6. nsa_bindx() . . . . . . . . . . . . . . . . . . . . . . . 8 64 3.7. nsa_bindn() . . . . . . . . . . . . . . . . . . . . . . . 9 65 3.8. nsa_connect() . . . . . . . . . . . . . . . . . . . . . . 9 66 3.9. nsa_connectx() . . . . . . . . . . . . . . . . . . . . . 10 67 3.10. nsa_connectn() . . . . . . . . . . . . . . . . . . . . . 11 68 3.11. nsa_listen() . . . . . . . . . . . . . . . . . . . . . . 11 69 3.12. nsa_accept() . . . . . . . . . . . . . . . . . . . . . . 12 70 3.13. nsa_accept4() . . . . . . . . . . . . . . . . . . . . . . 12 71 3.14. nsa_shutdown() . . . . . . . . . . . . . . . . . . . . . 13 72 4. Options Handling . . . . . . . . . . . . . . . . . . . . . . 13 73 4.1. nsa_getsockopt() . . . . . . . . . . . . . . . . . . . . 13 74 4.2. nsa_setsockopt() . . . . . . . . . . . . . . . . . . . . 14 75 4.3. nsa_opt_info() . . . . . . . . . . . . . . . . . . . . . 14 76 5. Security . . . . . . . . . . . . . . . . . . . . . . . . . . 15 77 5.1. nsa_set_secure_identity() . . . . . . . . . . . . . . . . 15 78 5.2. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 79 6. Input/Output Handling . . . . . . . . . . . . . . . . . . . . 15 80 6.1. nsa_write() . . . . . . . . . . . . . . . . . . . . . . . 15 81 6.2. nsa_writev() . . . . . . . . . . . . . . . . . . . . . . 16 82 6.3. nsa_pwrite() . . . . . . . . . . . . . . . . . . . . . . 16 83 6.4. nsa_pwrite64() . . . . . . . . . . . . . . . . . . . . . 16 84 6.5. nsa_pwritev() . . . . . . . . . . . . . . . . . . . . . . 17 85 6.6. nsa_pwritev64() . . . . . . . . . . . . . . . . . . . . . 17 86 6.7. nsa_send() . . . . . . . . . . . . . . . . . . . . . . . 17 87 6.8. nsa_sendto() . . . . . . . . . . . . . . . . . . . . . . 18 88 6.9. nsa_sendmsg() . . . . . . . . . . . . . . . . . . . . . . 18 89 6.10. nsa_sendv() . . . . . . . . . . . . . . . . . . . . . . . 19 90 6.11. nsa_read() . . . . . . . . . . . . . . . . . . . . . . . 20 91 6.12. nsa_readv() . . . . . . . . . . . . . . . . . . . . . . . 20 92 6.13. nsa_pread() . . . . . . . . . . . . . . . . . . . . . . . 21 93 6.14. nsa_pread64() . . . . . . . . . . . . . . . . . . . . . . 21 94 6.15. nsa_preadv() . . . . . . . . . . . . . . . . . . . . . . 21 95 6.16. nsa_preadv64() . . . . . . . . . . . . . . . . . . . . . 21 96 6.17. nsa_recv() . . . . . . . . . . . . . . . . . . . . . . . 22 97 6.18. nsa_recvfrom() . . . . . . . . . . . . . . . . . . . . . 22 98 6.19. nsa_recvmsg() . . . . . . . . . . . . . . . . . . . . . . 23 99 6.20. nsa_recvv() . . . . . . . . . . . . . . . . . . . . . . . 23 100 7. Poll and Select . . . . . . . . . . . . . . . . . . . . . . . 24 101 7.1. nsa_poll() . . . . . . . . . . . . . . . . . . . . . . . 24 102 7.2. nsa_select() . . . . . . . . . . . . . . . . . . . . . . 25 103 8. Address Handling . . . . . . . . . . . . . . . . . . . . . . 25 104 8.1. nsa_getsockname() . . . . . . . . . . . . . . . . . . . . 25 105 8.2. nsa_getpeername() . . . . . . . . . . . . . . . . . . . . 26 106 8.3. nsa_getladdrs() . . . . . . . . . . . . . . . . . . . . . 26 107 8.4. nsa_freeladdrs() . . . . . . . . . . . . . . . . . . . . 27 108 8.5. nsa_getpaddrs() . . . . . . . . . . . . . . . . . . . . . 27 109 8.6. nsa_freepaddrs() . . . . . . . . . . . . . . . . . . . . 28 110 9. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . 28 111 9.1. nsa_open() . . . . . . . . . . . . . . . . . . . . . . . 28 112 9.2. nsa_creat() . . . . . . . . . . . . . . . . . . . . . . . 28 113 9.3. nsa_lockf() . . . . . . . . . . . . . . . . . . . . . . . 28 114 9.4. nsa_lockf64() . . . . . . . . . . . . . . . . . . . . . . 29 115 9.5. nsa_flock() . . . . . . . . . . . . . . . . . . . . . . . 29 116 9.6. nsa_fstat() . . . . . . . . . . . . . . . . . . . . . . . 29 117 9.7. nsa_fpathconf() . . . . . . . . . . . . . . . . . . . . . 29 118 9.8. nsa_fchown() . . . . . . . . . . . . . . . . . . . . . . 30 119 9.9. nsa_fsync() . . . . . . . . . . . . . . . . . . . . . . . 30 120 9.10. nsa_fdatasync() . . . . . . . . . . . . . . . . . . . . . 30 121 9.11. nsa_syncfs() . . . . . . . . . . . . . . . . . . . . . . 30 122 9.12. nsa_dup2() . . . . . . . . . . . . . . . . . . . . . . . 31 123 9.13. nsa_dup3() . . . . . . . . . . . . . . . . . . . . . . . 31 124 9.14. nsa_dup() . . . . . . . . . . . . . . . . . . . . . . . . 31 125 9.15. nsa_lseek() . . . . . . . . . . . . . . . . . . . . . . . 31 126 9.16. nsa_lseek64() . . . . . . . . . . . . . . . . . . . . . . 32 127 9.17. nsa_truncate() . . . . . . . . . . . . . . . . . . . . . 32 128 9.18. nsa_truncate64() . . . . . . . . . . . . . . . . . . . . 32 129 9.19. nsa_pipe() . . . . . . . . . . . . . . . . . . . . . . . 32 130 9.20. nsa_ioctl() . . . . . . . . . . . . . . . . . . . . . . . 33 131 10. Code Examples . . . . . . . . . . . . . . . . . . . . . . . . 33 132 11. Testbed Platform . . . . . . . . . . . . . . . . . . . . . . 33 133 12. Security Considerations . . . . . . . . . . . . . . . . . . . 33 134 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 135 14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 33 136 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 137 15.1. Normative References . . . . . . . . . . . . . . . . . . 34 138 15.2. Informative References . . . . . . . . . . . . . . . . . 34 139 15.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 36 140 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 36 142 1. Introduction 144 The NEAT project [12], [13], [5], [3], [8] wants to achieve a 145 complete redesign of the way in which Internet applications interact 146 with the network. Our goal is to allow network "services" offered to 147 applications - such as reliability, low-delay communication or 148 security - to be dynamically tailored based on application demands, 149 current network conditions, hardware capabilities or local policies, 150 and also to support the integration of new network functionality in 151 an evolutionary fashion. 153 This document describes the NEAT Sockets API on top of the callback- 154 based NEAT User API [4]. It provides a BSD Sockets-like API that 155 facilitates porting existing applications to use a subset of NEAT's 156 functionality. For further information on NEAT, see also [12], [13], 157 [14], [15], [16]. 159 1.1. Conventions 161 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 162 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 163 document are to be interpreted as described in [1]. 165 2. Initialisation and Clean-Up 167 2.1. nsa_init() 169 nsa_init() is used to explicitly initialise the NEAT Sockets API. In 170 the usual case, however, the NEAT Sockets API is automatically 171 initialized when creating a NEAT socket. Explicit initialisation may 172 only be necessary in a multi-threaded program, in order to avoid 173 parallel initialisation calls. 175 Function Prototype: 177 int nsa_init() 179 Return Value: 181 nsa_init() returns the new NEAT socket descriptor, or -1 in case of 182 error. The error code will be set in the errno variable. 184 2.2. nsa_cleanup() 186 nsa_cleanup() is used to free all resources allocated by NEAT. Note, 187 that the NEAT Sockets API is automatically initialized when creating 188 a NEAT socket. 190 Function Prototype: 192 void nsa_cleanup() 194 2.3. nsa_map_socket() 196 nsa_map_socket() is used to map a system socket descriptor into the 197 NEAT socket descriptor space. This is useful for using NEAT API 198 functions as wrapper to calls on non-NEAT sockets. Mapped socket 199 descriptors can be unmapped by using nsa_unmap_socket(). 201 Function Prototype: 203 int nsa_map_socket(int systemSD, int neatSD) 205 Arguments: 207 systemSD: System socket descriptor. 209 neatSD: Desired NEAT socket descriptor; -1 for automatic allocation. 211 Return Value: 213 nsa_map_socket() returns the new NEAT socket descriptor, or -1 in 214 case of error. The error code will be set in the errno variable. 216 2.4. nsa_unmap_socket() 218 nsa_unmap_socket() is used to unmap a system socket descriptor from 219 the NEAT socket descriptor space. 221 Function Prototype: 223 int nsa_unmap_socket(int neatSD) 225 Arguments: 227 neatSD: NEAT socket descriptor. 229 3. Connection Establishment and Teardown 231 3.1. nsa_socket() 233 nsa_socket() creates a new NEAT socket. The NEAT socket can either 234 be a wrapper around the NEAT User API (if properties are specified) 235 or be a wrapper around a system socket (if no properties are 236 specified). 238 Function Prototype: 240 int nsa_socket(int domain, int type, int protocol, 241 const char* properties) 243 Arguments: 245 domain: Domain for system socket (e.g. AF_INET). 247 type: Type for system socket (SOCK_SEQPACKET). 249 protocol: Protocol for system socket (IPPROTO_SCTP). 251 properties: Properties for NEAT Core socket. 253 Return Value: 255 nsa_socket() returns the NEAT socket descriptor in case of success, 256 or -1 in case of error. The error code will be set in the errno 257 variable. 259 See the socket() documentation for details. 261 3.2. nsa_socketpair() 263 nsa_socketpair() is a wrapper around the socketpair() call, returning 264 NEAT socket descriptors instead. Note, that socketpair() only 265 supports AF_UNIX sockets, i.e. this function is just a wrapper for 266 the system function. 268 Function Prototype: 270 int nsa_socketpair(int domain, int type, int protocol, 271 const char* properties) 273 See the socketpair() documentation for details. 275 3.3. nsa_close() 277 nsa_close() closes a given NEAT socket. 279 Function Prototype: 281 int nsa_close(int sockfd) 283 Arguments: 285 sockfd: NEAT socket descriptor. 287 nsa_close() returns 0 in case of success, or -1 in case of error. 288 The error code will be set in the errno variable. 290 See the close() documentation for details. 292 3.4. nsa_fcntl() 294 nsa_fcntl() manipulates a given NEAT socket. 296 Function Prototype: 298 int nsa_fcntl(int sockfd, int cmd, ...) 300 Arguments: 302 sockfd: NEAT socket descriptor. 304 cmd: Command. 306 ...: Command-specific arguments. 308 nsa_fcntl() returns a command-specific value. 310 For NEAT sockets, the following commands are specified: 312 F_GETFL: Obtain value of the socket descriptor status flags. For 313 NEAT sockets, the flag O_NONBLOCK specifies whether the socket is 314 non-blocking. By default, it is blocking (i.e. O_NONBLOCK is not 315 set). 317 F_SETFL: Set value of the socket descriptor status flags. For NEAT 318 sockets, the flag O_NONBLOCK specifies whether the socket is non- 319 blocking. By default, it is blocking (i.e. O_NONBLOCK is not 320 set). F_SETFL can then be used to change the blocking mode. 322 See the fcntl() documentation for details. 324 3.5. nsa_bind() 326 nsa_bind() binds a given NEAT socket to a given address. Note: this 327 function is provided as legacy wrapper, and it is RECOMMENDED to use 328 nsa_bindn() instead. Note further, that nsa_bind() also supports a 329 single address only (i.e. no multi-homing). nsa_bindx() SHOULD be 330 used instead to support multi-homing. 332 Function Prototype: 334 int nsa_bind(int sockfd, 335 const struct sockaddr* addr, socklen_t addrlen, 336 struct neat_tlv* opt, const int optcnt) 338 Arguments: 340 sockfd: NEAT socket descriptor. 342 addr: Address to bind to. 344 addrlen: Length of the address structure "addr". 346 opt: NEAT options (NULL, if there are none). 348 optcnt: Number of NEAT options provided by "opt". 350 nsa_bind() returns 0 in case of success, or -1 in case of error. The 351 error code will be set in the errno variable. 353 See the bind() documentation for details. 355 3.6. nsa_bindx() 357 nsa_bindx() binds a given NEAT socket to a given set of addresses. 358 Note: this function is provided as legacy wrapper, and it is 359 RECOMMENDED to use nsa_bindn() instead. 361 Function Prototype: 363 int nsa_bindx(int sockfd, const struct sockaddr* addrs, int addrcnt, 364 int flags, 365 struct neat_tlv* opt, const int optcnt) 367 Arguments: 369 sockfd: NEAT socket descriptor. 371 addrs: Addresses to bind to. 373 addrcnt: Number of addresses in "addr". 375 flags: Optional flags (0, if there are none). 377 opt: NEAT options (NULL, if there are none). 379 optcnt: Number of NEAT options provided by "opt". 381 nsa_bindx() returns 0 in case of success, or -1 in case of error. 382 The error code will be set in the errno variable. 384 See the sctp_bindx() documentation for details. 386 3.7. nsa_bindn() 388 nsa_bindn() binds a given NEAT socket to a given port. NEAT takes 389 care of handling local addresses. 391 Function Prototype: 393 int nsa_bindn(int sockfd, uint16_t port, int flags, 394 struct neat_tlv* opt, const int optcnt) 396 Arguments: 398 sockfd: NEAT socket descriptor. 400 port: Port number to bind to. 402 flags: Optional flags (0, if there are none). 404 opt: NEAT options (NULL, if there are none). 406 optcnt: Number of NEAT options provided by "opt". 408 nsa_bindn() returns 0 in case of success, or -1 in case of error. 409 The error code will be set in the errno variable. 411 3.8. nsa_connect() 413 nsa_connect() connects a given NEAT socket to a given remote address. 414 Note: this function is provided as legacy wrapper, and it is 415 RECOMMENDED to use nsa_connectn() instead. Note further, that 416 nsa_connect() also supports a single address only (i.e. no multi- 417 homing). nsa_connectx() SHOULD be used instead to support multi- 418 homing. 420 Function Prototype: 422 int nsa_connect(int sockfd, 423 const struct sockaddr* addr, socklen_t addrlen, 424 struct neat_tlv* opt, const int optcnt) 426 Arguments: 428 sockfd: NEAT socket descriptor. 430 addr: Address to connect to. 432 addrlen: Length of the address structure "addr". 434 opt: NEAT options (NULL, if there are none). 436 optcnt: Number of NEAT options provided by "opt". 438 nsa_connect() returns 0 in case of success, or -1 in case of error. 439 The error code will be set in the errno variable. 441 See the connect() documentation for details. 443 3.9. nsa_connectx() 445 nsa_connectx() connects a given NEAT socket to a given set of remote 446 addresses. Note: this function is provided as legacy wrapper, and it 447 is RECOMMENDED to use nsa_connectn() instead. 449 Function Prototype: 451 int nsa_connectx(int sockfd, 452 const struct sockaddr* addrs, int addrcnt, 453 neat_assoc_t* id, 454 struct neat_tlv* opt, const int optcnt) 456 Arguments: 458 sockfd: NEAT socket descriptor. 460 addrs: Addresses to connect to. 462 addrcnt: Number of addresses in "addr". 464 id Pointer to store association ID to (not used yet, use NULL!). 466 opt: NEAT options (NULL, if there are none). 468 optcnt: Number of NEAT options provided by "opt". 470 nsa_connectx() returns 0 in case of success, or -1 in case of error. 471 The error code will be set in the errno variable. 473 See the sctp_connectx() documentation for details. 475 3.10. nsa_connectn() 477 nsa_connectn() connects a given NEAT socket to a given remote name 478 and port. The remote name is resolved by NEAT to corresponding 479 remote addresses. 481 Function Prototype: 483 int nsa_connectn(int sockfd, const char* name, const uint16_t port, 484 neat_assoc_t* id, 485 struct neat_tlv* opt, const int optcnt) 487 Arguments: 489 sockfd: NEAT socket descriptor. 491 name: Remote name to connect to. 493 port: Remote port number to connect to. 495 id Pointer to store association ID to (not used yet, use NULL!). 497 opt: NEAT options (NULL, if there are none). 499 optcnt: Number of NEAT options provided by "opt". 501 nsa_connectn() returns 0 in case of success, or -1 in case of error. 502 The error code will be set in the errno variable. 504 3.11. nsa_listen() 506 nsa_listen() marks a given NEAT socket as listening socket, i.e. 507 accepting incoming connections. 509 Function Prototype: 511 int nsa_listen(int sockfd, int backlog) 513 Arguments: 515 sockfd: NEAT socket descriptor. 517 backlog: Defines the maximum length to which the queue of pending 518 connections for "sockfd" may grow. 520 nsa_listen() returns 0 in case of success, or -1 in case of error. 521 The error code will be set in the errno variable. 523 See the listen() documentation for details. 525 3.12. nsa_accept() 527 nsa_accept() extracts the first connection request in the queue of 528 pending connections for a listening NEAT socket, creates a new 529 connected socket, and returns a new NEAT socket descriptor referring 530 to that socket. 532 Function Prototype: 534 int nsa_accept(int sockfd, struct sockaddr* addr, socklen_t* addrlen) 536 Arguments: 538 sockfd: NEAT socket descriptor. 540 addr: Pointer to storage space to store the peer's primary address 541 to (or NULL, if address is not needed). 543 addrlen: Pointer to variable with size of the storage in "addr" (or 544 NULL, if address is not needed). 546 nsa_accept() returns the new NEAT socket descriptor in case of 547 success, or -1 in case of error. The error code will be set in the 548 errno variable. In case of success, the peer's primary address is 549 stored in "addr", if there is sufficient space. The variable pointer 550 to by "addrlen" will then contain the actual address size. 552 See the accept() documentation for details. 554 3.13. nsa_accept4() 556 nsa_accept4() extracts the first connection request in the queue of 557 pending connections for a listening NEAT socket, creates a new 558 connected socket, and returns a new NEAT socket descriptor referring 559 to that socket. If successful, and flags!=0, nsa_accept4() 560 furthermore makes the new socket non-blocking (SOCK_NONBLOCK flag) 561 and/or close-on-exec (SOCK_CLOEXEC flag). For flags==0, the 562 behaviour is identical to nsa_accept(). 564 Function Prototype: 566 int nsa_accept4(int sockfd, 567 struct sockaddr* addr, socklen_t* addrlen, 568 int flags) 570 Arguments: 572 sockfd: NEAT socket descriptor. 574 addr: Pointer to storage space to store the peer's primary address 575 to (or NULL, if address is not needed). 577 addrlen: Pointer to variable with size of the storage in "addr" (or 578 NULL, if address is not needed). 580 nsa_accept4() returns the new NEAT socket descriptor in case of 581 success, or -1 in case of error. The error code will be set in the 582 errno variable. In case of success, the peer's primary address is 583 stored in "addr", if there is sufficient space. The variable pointer 584 to by "addrlen" will then contain the actual address size. 586 See the accept() documentation for details. 588 3.14. nsa_shutdown() 590 nsa_shutdown() shuts down the connection of a given NEAT socket. 592 Function Prototype: 594 int nsa_shutdown(int sockfd, int how) 596 Arguments: 598 sockfd: NEAT socket descriptor. 600 how: Not used for NEAT sockets (set to SHUT_RDWR). 602 nsa_shutdown() returns 0 in case of success, or -1 in case of error. 603 The error code will be set in the errno variable. 605 See the shutdown() documentation for details. 607 4. Options Handling 609 4.1. nsa_getsockopt() 611 nsa_getsockopt() gets a socket option of a given NEAT socket. 613 Function Prototype: 615 int nsa_getsockopt(int sockfd, int level, int optname, 616 void* optval, socklen_t* optlen) 618 Arguments: 620 sockfd: NEAT socket descriptor. 622 level: Option level. 624 optname: Option number. 626 optval: Buffer to store option value to. 628 optlen: Pointer to variable with length of the buffer in "optval". 630 nsa_getsockopt() returns 0 in case of success, or -1 in case of 631 error. The error code will be set in the errno variable. 633 See the getsockopt() documentation for details. 635 4.2. nsa_setsockopt() 637 nsa_getsockopt() sets a socket option of a given NEAT socket. 639 Function Prototype: 641 int nsa_setsockopt(int sockfd, int level, int optname, 642 const void* optval, socklen_t optlen) 644 Arguments: 646 sockfd: NEAT socket descriptor. 648 level: Option level. 650 optname: Option number. 652 optval: Buffer with option value to set. 654 optlen: Length of buffer with option value. 656 nsa_setsockopt() returns 0 in case of success, or -1 in case of 657 error. The error code will be set in the errno variable. 659 See the setsockopt() documentation for details. 661 4.3. nsa_opt_info() 663 nsa_opt_info() gets a socket option of a given NEAT socket. 665 Function Prototype: 667 int nsa_opt_info(int sockfd, neat_assoc_t id, 668 int opt, void* arg, socklen_t* size) 670 Arguments: 672 sockfd: NEAT socket descriptor. 674 id: Association identifier (0 in case of 1:1-style sockets). 676 opt: Option number. 678 arg: Buffer to store option value to. 680 size: Pointer to variable with length of the buffer in "arg". 682 nsa_opt_info() returns 0 in case of success, or -1 in case of error. 683 The error code will be set in the errno variable. 685 See the sctp_opt_info() documentation for details. 687 5. Security 689 5.1. nsa_set_secure_identity() 691 TBD. 693 5.2. ... 695 TBD. 697 6. Input/Output Handling 699 6.1. nsa_write() 701 nsa_write() sends data over a given connected NEAT socket. For NEAT 702 sockets, nsa_write() is equal to nsa_send() with "flags" set to 0. 704 Function Prototype: 706 ssize_t nsa_write(int fd, const void* buf, size_t len) 708 Arguments: 710 fd: NEAT socket descriptor. 712 buf: Data to send. 714 len: Length of data to send. 716 nsa_write() returns the number of sent bytes in case of success, or 717 -1 in case of error. The error code will be set in the errno 718 variable. 720 See the write() documentation for details. 722 6.2. nsa_writev() 724 nsa_writev() sends data over a given connected NEAT socket. The data 725 is provided by an iovec structure. 727 Function Prototype: 729 ssize_t nsa_writev(int fd, const struct iovec* iov, int iovcnt) 731 Arguments: 733 sockfd: NEAT socket descriptor. 735 iov: Data to send provided as iovec structures. 737 iovcnt: Number of provided iovec structures. 739 nsa_writev() returns the number of sent bytes in case of success, or 740 -1 in case of error. The error code will be set in the errno 741 variable. 743 See the writev() documentation for details. 745 6.3. nsa_pwrite() 747 nsa_pwrite() is a wrapper around the pwrite() call, using a NEAT 748 socket descriptor instead. 750 Function Prototype: 752 ssize_t nsa_pwrite(int fd, const void* buf, size_t len, off_t offset) 754 See the pwrite() documentation for details. 756 6.4. nsa_pwrite64() 758 nsa_pwrite64() is a wrapper around the pwrite64() call, using a NEAT 759 socket descriptor instead. 761 Function Prototype: 763 ssize_t nsa_pwrite(int fd, const void* buf, size_t len, 764 off64_t offset) 766 See the pwrite64() documentation for details. 768 6.5. nsa_pwritev() 770 nsa_pwritev() is a wrapper around the pwritev() call, using a NEAT 771 socket descriptor instead. 773 Function Prototype: 775 ssize_t nsa_pwritev(int fd, const struct iovec* iov, int iovcnt, 776 off_t offset) 778 See the pwritev() documentation for details. 780 6.6. nsa_pwritev64() 782 nsa_pwritev64() is a wrapper around the pwritev64() call, using a 783 NEAT socket descriptor instead. 785 Function Prototype: 787 ssize_t nsa_pwritev(int fd, const struct iovec* iov, int iovcnt, 788 off64_t offset) 790 See the pwritev64() documentation for details. 792 6.7. nsa_send() 794 nsa_send() sends data over a given connected NEAT socket. 796 Function Prototype: 798 ssize_t nsa_send(int sockfd, const void* buf, size_t len, int flags) 800 Arguments: 802 sockfd: NEAT socket descriptor. 804 buf: Data to send. 806 len: Length of data to send. 808 flags: Optional flags (0, if there are none). 810 nsa_send() returns the number of sent bytes in case of success, or -1 811 in case of error. The error code will be set in the errno variable. 813 See the send() documentation for details. 815 6.8. nsa_sendto() 817 nsa_sendto() is a wrapper around the sendto() call, using NEAT socket 818 descriptors instead. Note: this function is provided as legacy 819 wrapper, and it is RECOMMENDED to use nsa_send() instead. On NEAT 820 sockets, a provided destination address is ignored. 822 Function Prototype: 824 ssize_t nsa_sendto(int sockfd, const void* buf, size_t len, 825 int flags, 826 const struct sockaddr* to, socklen_t tolen) 828 Arguments: 830 sockfd: NEAT socket descriptor. 832 buf: Data to send. 834 len: Length of data to send. 836 flags: Optional flags (0, if there are none). 838 to: Address to send data to (ignored for NEAT sockets). 840 tolen: Length of address to send data to (ignored for NEAT sockets). 842 nsa_sendto() returns the number of sent bytes in case of success, or 843 -1 in case of error. The error code will be set in the errno 844 variable. 846 See the send() documentation for details. 848 6.9. nsa_sendmsg() 850 nsa_sendmsg() sends data over a given connected NEAT socket. The 851 data and control information is provided by a msghdr structure. On 852 NEAT sockets, a provided destination address is ignored. 854 Function Prototype: 856 ssize_t nsa_sendmsg(int sockfd, const struct msghdr* msg, int flags) 857 Arguments: 859 sockfd: NEAT socket descriptor. 861 msg: Data to send and corresponding control information as msghdr 862 structure. 864 flags: Optional flags (0, if there are none). 866 nsa_sendmsg() returns the number of sent bytes in case of success, or 867 -1 in case of error. The error code will be set in the errno 868 variable. 870 See the sendmsg() documentation for details. 872 6.10. nsa_sendv() 874 nsa_sendv() sends data over a given connected NEAT socket. The data 875 and control information is provided by iovec and info structures. On 876 NEAT sockets, a provided destination address is ignored. 878 Function Prototype: 880 ssize_t nsa_sendv(int sockfd, struct iovec* iov, int iovcnt, 881 struct sockaddr* to, int tocnt, 882 void* info, socklen_t infolen, 883 unsigned int infotype, int flags) 885 Arguments: 887 sockfd: NEAT socket descriptor. 889 iov: Data to send provided as iovec structures. 891 iovcnt: Number of provided iovec structures. 893 to: Address(es) to send data to (ignored for NEAT sockets). 895 tocnt: Number of of addresses to send data to (ignored for NEAT 896 sockets). 898 info: Control information. 900 infolen: Length of control information. 902 infotype: Type of control information. 904 flags: Optional flags (0, if there are none). 906 nsa_sendv() returns the number of sent bytes in case of success, or 907 -1 in case of error. The error code will be set in the errno 908 variable. 910 See the sctp_sendv() documentation for details. 912 6.11. nsa_read() 914 nsa_read() reads data from a given connected NEAT socket. For NEAT 915 sockets, nsa_read() is equal to nsa_recv() with "flags" set to 0. 917 Function Prototype: 919 ssize_t nsa_read(int fd, void* buf, size_t len) 921 Arguments: 923 fd: NEAT socket descriptor. 925 buf: Buffer to store read data to. 927 len: Length of the storage buffer. 929 nsa_read() returns the number of read bytes in case of success, 0 in 930 case of connection shutdown, or -1 in case of error. The error code 931 will be set in the errno variable. 933 See the read() documentation for details. 935 6.12. nsa_readv() 937 nsa_readv() reads data from a given connected NEAT socket. The data 938 information buffers are provided by an iovec structure. 940 Function Prototype: 942 ssize_t nsa_readv(int fd, const struct iovec* iov, int iovcnt) 944 Arguments: 946 fd: NEAT socket descriptor. 948 iov: Data to send provided as iovec structures. 950 iovcnt: Number of provided iovec structures. 952 nsa_readv() returns the number of read bytes in case of success, 0 in 953 case of connection shutdown, or -1 in case of error. The error code 954 will be set in the errno variable. 956 See the readv() documentation for details. 958 6.13. nsa_pread() 960 nsa_pread() is a wrapper around the pread() call, using a NEAT socket 961 descriptor instead. 963 Function Prototype: 965 ssize_t nsa_pread(int fd, void* buf, size_t len, off_t offset) 967 See the pread() documentation for details. 969 6.14. nsa_pread64() 971 nsa_pread64() is a wrapper around the pread64() call, using a NEAT 972 socket descriptor instead. 974 Function Prototype: 976 ssize_t nsa_pread(int fd, void* buf, size_t len, off_t offset) 978 See the pread64() documentation for details. 980 6.15. nsa_preadv() 982 nsa_preadv() is a wrapper around the preadv() call, using a NEAT 983 socket descriptor instead. 985 Function Prototype: 987 ssize_t nsa_preadv(int fd, const struct iovec* iov, int iovcnt, 988 off64_t offset) 990 See the preadv() documentation for details. 992 6.16. nsa_preadv64() 994 nsa_preadv64() is a wrapper around the preadv64() call, using a NEAT 995 socket descriptor instead. 997 Function Prototype: 999 ssize_t nsa_preadv(int fd, const struct iovec* iov, int iovcnt, 1000 off64_t offset) 1002 See the preadv64() documentation for details. 1004 6.17. nsa_recv() 1006 nsa_recv() reads data from a given connected NEAT socket. 1008 Function Prototype: 1010 ssize_t nsa_recv(int sockfd, void* buf, size_t len, int flags) 1012 Arguments: 1014 sockfd: NEAT socket descriptor. 1016 buf: Buffer to store read data to. 1018 len: Length of the storage buffer. 1020 flags: Optional flags (0, if there are none). 1022 nsa_recv() returns the number of read bytes in case of success, 0 in 1023 case of connection shutdown, or -1 in case of error. The error code 1024 will be set in the errno variable. 1026 See the recv() documentation for details. 1028 6.18. nsa_recvfrom() 1030 nsa_recvfrom() reads data from a given connected NEAT socket. The 1031 peer's sending address of the data (if possible and useful for 1032 underlying transport protocol) is obtained as well. Note: this 1033 function is provided as legacy wrapper, and it is RECOMMENDED to use 1034 nsa_recv() instead. 1036 Function Prototype: 1038 ssize_t nsa_recvfrom(int sockfd, void* buf, size_t len, int flags, 1039 struct sockaddr* from, socklen_t* fromlen) 1041 sockfd: NEAT socket descriptor. 1043 buf: Buffer to store read data to. 1045 len: Length of the storage buffer. 1047 flags: Optional flags (0, if there are none). 1049 from: Pointer to storage space to store the peer's primary address 1050 to (or NULL, if address is not needed). 1052 fromlen: Pointer to variable with size of the storage in "from" (or 1053 NULL, if address is not needed). 1055 nsa_recvfrom() returns the number of read bytes in case of success, 0 1056 in case of connection shutdown, or -1 in case of error. The error 1057 code will be set in the errno variable. In case of success, the 1058 peer's sending address (if possible and useful for underlying 1059 transport protocol) may be stored in "from", if there is sufficient 1060 space. The variable pointer to by "fromlen" will then contain the 1061 actual address size. 1063 See the recvfrom() documentation for details. 1065 6.19. nsa_recvmsg() 1067 nsa_recvmsg() reads data from a given connected NEAT socket. The 1068 data and control information buffers are provided by a msghdr 1069 structure. 1071 Function Prototype: 1073 ssize_t nsa_recvmsg(int sockfd, struct msghdr* msg, int flags) 1075 Arguments: 1077 sockfd: NEAT socket descriptor. 1079 msg: Data to send and corresponding control information as msghdr 1080 structure. 1082 flags: Optional flags (0, if there are none). 1084 nsa_recvmsg() returns the number of read bytes in case of success, 0 1085 in case of connection shutdown, or -1 in case of error. The error 1086 code will be set in the errno variable. 1088 See the recvmsg() documentation for details. 1090 6.20. nsa_recvv() 1092 nsa_recvv() reads data from a given connected NEAT socket. The data 1093 and control information buffers are provided by iovec and info 1094 structures. 1096 Function Prototype: 1098 ssize_t nsa_recvv(int sockfd, struct iovec* iov, int iovcnt, 1099 struct sockaddr* from, socklen_t* fromlen, 1100 void* info, socklen_t* infolen, 1101 unsigned int* infotype, int* msg_flags) 1103 Arguments: 1105 sockfd: NEAT socket descriptor. 1107 iov: Data to send provided as iovec structures. 1109 iovcnt: Number of provided iovec structures. 1111 from: Pointer to storage space to store the peer's primary address 1112 to (or NULL, if address is not needed). 1114 fromlen: Pointer to variable with size of the storage in "from" (or 1115 NULL, if address is not needed). 1117 info: Pointer to storage space for control information. 1119 infolen: Pointer to variable with length of control information. 1121 infotype: Pointer to variable for storing the control information 1122 type to. 1124 flags: Pointer to variable with optional flags. 1126 nsa_recvv() returns the number of sent received in case of success, 1127 or -1 in case of error. The error code will be set in the errno 1128 variable. 1130 See the sctp_recvv() documentation for details. 1132 7. Poll and Select 1134 7.1. nsa_poll() 1136 nsa_poll() waits for activity (input/output/error/...) on a set of 1137 given NEAT sockets. 1139 Function Prototype: 1141 int nsa_poll(struct pollfd* ufds, const nfds_t nfds, int timeout) 1143 Arguments: 1145 ufds: NEAT socket descriptor and requested activity for each NEAT 1146 socket. 1148 nfds: Number of sockets given by "ufds". 1150 timeout: Timeout in milliseconds. 1152 nsa_poll() returns the number of NEAT sockets with activity in case 1153 of success, 0 in case of timeout, or -1 in case of error. The error 1154 code will be set in the errno variable. 1156 See the poll() documentation for details. 1158 7.2. nsa_select() 1160 nsa_select() is a wrapper around the select() call, using NEAT socket 1161 descriptors instead. Note: this function is provided as legacy 1162 wrapper, and it is RECOMMENDED to use nsa_poll() instead. 1164 Function Prototype: 1166 int nsa_select(int n, 1167 fd_set* readfds, fd_set* writefds, fd_set* exceptfds, 1168 struct timeval* timeout) 1170 See the select() documentation for details. 1172 8. Address Handling 1174 8.1. nsa_getsockname() 1176 nsa_getsockname() obtains the first local address of a socket. Note: 1177 this function is provided as legacy wrapper, and it is RECOMMENDED to 1178 use nsa_getladdrs() instead to support multi-homed transport 1179 protocols! 1181 Function Prototype: 1183 int nsa_getsockname(int sockfd, 1184 struct sockaddr* name, socklen_t* namelen) 1186 Arguments: 1188 sockfd: NEAT socket descriptor. 1190 name: Storage space for the address. 1192 namelen: Pointer to variable with the storage space's size. 1194 Return Value: 1196 nsa_getsockname() returns 0 in case of success (with the actual 1197 address size stored into the "namelen" variable), or -1 in case of 1198 error. The error code will be set in the errno variable. 1200 See the getsockname() documentation for details. 1202 8.2. nsa_getpeername() 1204 nsa_getpeername() obtains the first remote address of a connected 1205 socket. Note: this function is provided as legacy wrapper, and it is 1206 RECOMMENDED to use nsa_getpaddrs() instead to support multi-homed 1207 transport protocols! 1209 Function Prototype: 1211 int nsa_getpeername(int sockfd, 1212 struct sockaddr* name, socklen_t* namelen) 1214 Arguments: 1216 sockfd: NEAT socket descriptor. 1218 name: Storage space for the address. 1220 namelen: Pointer to variable with the storage space's size. 1222 Return Value: 1224 nsa_getpeername() returns 0 in case of success (with the actual 1225 address size stored into the "namelen" variable), or -1 in case of 1226 error. The error code will be set in the errno variable. 1228 See the getpeername() documentation for details. 1230 8.3. nsa_getladdrs() 1232 nsa_getladdrs() obtains the local addresses of a socket. The storage 1233 space for the addresses will be automatically allocated and needs to 1234 be freed by nsa_freeladdrs(). 1236 Function Prototype: 1238 int nsa_getladdrs(int sockfd, neat_assoc_t id, 1239 struct sockaddr** addrs) 1241 Arguments: 1243 sockfd: NEAT socket descriptor. 1245 id: Association identifier (0 in case of 1:1-style sockets). 1247 addrs: Pointer to variable to store pointer to addresses to. 1249 nsa_getladdrs() returns the number of addresses stored into a newly 1250 allocated space. The pointer to this space is stored into the 1251 variable provided by "addrs". In case of error, -1 is returned, and 1252 the error code will be set in the errno variable. 1254 8.4. nsa_freeladdrs() 1256 nsa_freeladdrs() frees addresses obtained by nsa_getladdrs(). 1258 Function Prototype: 1260 void nsa_freeladdrs(struct sockaddr* addrs) 1262 Arguments: 1264 addrs: Pointer to addresses to be freed. 1266 8.5. nsa_getpaddrs() 1268 nsa_getpaddrs() obtains the remote addresses of a connected socket. 1269 The storage space for the addresses will be automatically allocated 1270 and needs to be freed by nsa_freepaddrs(). 1272 Function Prototype: 1274 int nsa_getpaddrs(int sockfd, neat_assoc_t id, 1275 struct sockaddr** addrs) 1277 Arguments: 1279 sockfd: NEAT socket descriptor. 1281 id: Association identifier (0 in case of 1:1-style sockets). 1283 addrs: Pointer to variable to store pointer to addresses to. 1285 nsa_getpaddrs() returns the number of addresses stored into a newly 1286 allocated space. The pointer to this space is stored into the 1287 variable provided by "addrs". In case of error, -1 is returned, and 1288 the error code will be set in the errno variable. 1290 8.6. nsa_freepaddrs() 1292 nsa_freepaddrs() frees addresses obtained by nsa_getpaddrs(). 1294 Function Prototype: 1296 void nsa_freepaddrs(struct sockaddr* addrs) 1298 Arguments: 1300 addrs: Pointer to addresses to be freed. 1302 9. Miscellaneous 1304 This section contains miscellaneous wrapper functions, mostly around 1305 file I/O. Since Unix file descriptors are used together with socket 1306 descriptors in functions like poll(), select(), etc., it is necessary 1307 to wrap functions handling file descriptors as well. 1309 9.1. nsa_open() 1311 nsa_open() is a wrapper around the open() call, returning a NEAT 1312 socket descriptor instead. 1314 Function Prototype: 1316 int nsa_open(const char* pathname, int flags, mode_t mode) 1318 See the open() documentation for details. 1320 9.2. nsa_creat() 1322 nsa_creat() is a wrapper around the creat() call, returning a NEAT 1323 socket descriptor instead. 1325 Function Prototype: 1327 int nsa_creat(const char* pathname, mode_t mode) 1329 See the creat() documentation for details. 1331 9.3. nsa_lockf() 1333 nsa_lockf() is a wrapper around the lockf() call, using a NEAT socket 1334 descriptor instead. 1336 Function Prototype: 1338 int nsa_lockf(int fd, int cmd, off_t len) 1340 See the lockf() documentation for details. 1342 9.4. nsa_lockf64() 1344 nsa_lockf64() is a wrapper around the lockf64() call, using a NEAT 1345 socket descriptor instead. 1347 Function Prototype: 1349 int nsa_lockf(int fd, int cmd, off64_t len) 1351 See the lockf64() documentation for details. 1353 9.5. nsa_flock() 1355 nsa_flock() is a wrapper around the flock() call, using a NEAT socket 1356 descriptor instead. 1358 Function Prototype: 1360 int nsa_flock(int fd, int operation) 1362 See the flock() documentation for details. 1364 9.6. nsa_fstat() 1366 nsa_fstat() is a wrapper around the fstat() call, using a NEAT socket 1367 descriptor instead. 1369 Function Prototype: 1371 int nsa_fstat(int fd, struct stat* buf) 1373 See the fstat() documentation for details. 1375 9.7. nsa_fpathconf() 1377 nsa_fpathconf() is a wrapper around the fpathconf() call, using a 1378 NEAT socket descriptor instead. 1380 Function Prototype: 1382 long nsa_fpathconf(int fd, int name) 1384 See the fpathconf() documentation for details. 1386 9.8. nsa_fchown() 1388 nsa_fchown() is a wrapper around the fchown() call, using a NEAT 1389 socket descriptor instead. 1391 Function Prototype: 1393 int nsa_fchown(int fd, uid_t owner, gid_t group) 1395 See the fchown() documentation for details. 1397 9.9. nsa_fsync() 1399 nsa_fsync() is a wrapper around the fsync() call, using a NEAT socket 1400 descriptor instead. 1402 Function Prototype: 1404 int nsa_fsync(int fd) 1406 See the fsync() documentation for details. 1408 9.10. nsa_fdatasync() 1410 nsa_fdatasync() is a wrapper around the fdatasync() call, using a 1411 NEAT socket descriptor instead. 1413 Function Prototype: 1415 int nsa_fdatasync(int fd) 1417 See the fdatasync() documentation for details. 1419 9.11. nsa_syncfs() 1421 nsa_syncfs() is a wrapper around the syncfs() call, using a NEAT 1422 socket descriptor instead. 1424 Function Prototype: 1426 int nsa_syncfs(int fd) 1428 See the syncfs() documentation for details. 1430 9.12. nsa_dup2() 1432 nsa_dup2() is a wrapper around the dup2() call, using a NEAT socket 1433 descriptor instead. 1435 Function Prototype: 1437 int nsa_dup2(int oldfd, int newfd) 1439 See the dup2() documentation for details. 1441 9.13. nsa_dup3() 1443 nsa_dup3() is a wrapper around the dup3() call, using a NEAT socket 1444 descriptor instead. 1446 Function Prototype: 1448 int nsa_dup3(int oldfd, int newfd, int flags) 1450 See the dup3() documentation for details. 1452 9.14. nsa_dup() 1454 nsa_dup() is a wrapper around the dup() call, using a NEAT socket 1455 descriptor instead. 1457 Function Prototype: 1459 int nsa_dup(int oldfd) 1461 See the dup() documentation for details. 1463 9.15. nsa_lseek() 1465 nsa_lseek() is a wrapper around the lseek() call, using a NEAT socket 1466 descriptor instead. 1468 Function Prototype: 1470 off_t nsa_lseek(int fd, off_t offset, int whence) 1472 See the lseek() documentation for details. 1474 9.16. nsa_lseek64() 1476 nsa_lseek64() is a wrapper around the lseek64() call, using a NEAT 1477 socket descriptor instead. 1479 Function Prototype: 1481 off_t nsa_lseek(int fd, off64_t offset, int whence) 1483 See the lseek64() documentation for details. 1485 9.17. nsa_truncate() 1487 nsa_truncate() is a wrapper around the truncate() call, using a NEAT 1488 socket descriptor instead. 1490 Function Prototype: 1492 int nsa_ftruncate(int fd, off_t length) 1494 See the truncate() documentation for details. 1496 9.18. nsa_truncate64() 1498 nsa_truncate64() is a wrapper around the truncate64() call, using a 1499 NEAT socket descriptor instead. 1501 Function Prototype: 1503 int nsa_ftruncate(int fd, off64_t length) 1505 See the truncate64() documentation for details. 1507 9.19. nsa_pipe() 1509 nsa_pipe() is a wrapper around the pipe() call, returning NEAT socket 1510 descriptors instead. 1512 Function Prototype: 1514 int nsa_pipe(int fds[2]) 1516 See the pipe() documentation for details. 1518 9.20. nsa_ioctl() 1520 nsa_ioctl() is a wrapper around the ioctl() call, using a NEAT socket 1521 descriptor instead. 1523 Function Prototype: 1525 int nsa_ioctl(int fd, int request, const void* argp) 1527 See the ioctl() documentation for details. 1529 10. Code Examples 1531 Running code examples can be found in the NEAT Git repository, with 1532 some tutorial material in [10], [11]: 1534 URL: https://github.com/NEAT-project/neat [1] 1536 Branch: dreibh/neat-socketapi [2] 1538 Directory: socketapi/examples/ [3] 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", draft-gjessing-taps-minset-05 1583 (work in progress), June 2017. 1585 [4] Fairhurst, G., "The NEAT Interface to Transport Services", 1586 draft-fairhurst-taps-neat-00 (work in progress), October 1587 2017. 1589 [5] Welzl, M., Tuexen, M., and N. Khademi, "On the Usage of 1590 Transport Features Provided by IETF Transport Protocols", 1591 draft-ietf-taps-transports-usage-09 (work in progress), 1592 October 2017. 1594 15.2. Informative References 1596 [6] Dreibholz, T., "NorNet - Building an Inter-Continental 1597 Internet Testbed based on Open Source 1598 Software", Proceedings of the LinuxCon Europe, October 1599 2016, . 1602 [7] Gran, E., Dreibholz, T., and A. Kvalbein, "NorNet Core - A 1603 Multi-Homed Research Testbed", Computer Networks, Special 1604 Issue on Future Internet Testbeds Volume 61, Pages 75-87, 1605 ISSN 1389-1286, DOI 10.1016/j.bjp.2013.12.035, March 2014, 1606 . 1608 [8] Dreibholz, T., "NEAT - A New, Evolutive API and Transport- 1609 Layer Architecture for the Internet", 1610 Online: https://www.neat-project.org/, 2020, 1611 . 1613 [9] Dreibholz, T., "NorNet - A Real-World, Large-Scale Multi- 1614 Homing Testbed", Online: https://www.nntb.no/, 2020, 1615 . 1617 [10] Dreibholz, T., "NEAT Tutorial at Hainan University: 1618 Getting Started with NEAT", Invited Talk at Hainan 1619 University, College of Information Science and 1620 Technology (CIST), December 2017, 1621 . 1624 [11] Dreibholz, T., "A Practical Introduction to NEAT at Hainan 1625 University", Invited Talk at Hainan University, College 1626 of Information Science and Technology (CIST), April 2017, 1627 . 1630 [12] Weinrank, F., Grinnemo, K., Bozakov, Z., Brunstroem, A., 1631 Dreibholz, T., Hurtig, P., Khademi, N., and M. Tuexen, "A 1632 NEAT Way to Browse the Web", Proceedings of the ACM, IRTF 1633 and ISOC Applied Networking Research Workshop (ANRW) Pages 1634 33-34, ISBN 978-1-4503-5108-9, 1635 DOI 10.1145/3106328.3106335, July 2017, 1636 . 1638 [13] Fairhurst, G., Jones, T., Bozakov, Z., Brunstroem, A., 1639 Damjanovic, D., Eckert, K., Grinnemo, K., Hansen, A., 1640 Khademi, N., Mangiante, S., McManus, P., Papastergiou, G., 1641 Ros, D., Tuexen, M., Vyncke, E., and M. Welzl, "NEAT 1642 Architecture", Number D1.1, December 2015, 1643 . 1646 [14] Welzl, M., Damjanovic, D., Fairhurst, G., Hayes, D., 1647 Jones, T., Ros, D., Tuexen, M., and F. Weinrank, "Final 1648 Version of Services and APIs", Deliverable D1.3, October 1649 2017, . 1652 [15] Khademi, N., Bozakov, Z., Brunstroem, A., Dale, Oe., 1653 Damjanovic, D., Evensen, K., Fairhurst, G., Grinnemo, 1654 K., Jones, T., Mangiante, S., Petlund, A., Ros, D., 1655 Stenberg, D., Tuexen, M., Weinrank, F., and M. Welzl, 1656 "NEAT - Core Transport System, with both Low-level and 1657 High-level Components", Number D2.2, March 2017, 1658 . 1661 [16] Khademi, N., Bozakov, Z., Brunstroem, A., Dale, Oe., 1662 Damjanovic, D., Evensen, K., Fairhurst, G., Fischer, 1663 A., Grinnemo, K., Jones, T., Mangiante, S., Petlund, A., 1664 Ros, D., Ruengeler, I., Stenberg, D., Tuexen, M., 1665 Weinrank, F., and M. Welzl, "Final Version of Core 1666 Transport System", Deliverable D2.3, August 2017, 1667 . 1670 15.3. URIs 1672 [1] https://github.com/NEAT-project/neat 1674 [2] https://github.com/NEAT-project/neat/tree/dreibh/neat-socketapi 1676 [3] https://github.com/NEAT-project/neat/tree/dreibh/neat- 1677 socketapi/socketapi/examples 1679 Author's Address 1681 Thomas Dreibholz 1682 Simula Metropolitan Centre for Digital Engineering 1683 Pilestredet 52 1684 0167 Oslo, Oslo 1685 Norway 1687 Phone: +47-6782-8200 1688 Fax: +47-6782-8201 1689 Email: dreibh@simula.no 1690 URI: https://www.simula.no/people/dreibh