idnits 2.17.1 draft-dreibholz-taps-neat-socketapi-02.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 (October 30, 2017) is 2363 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 Simula Research Laboratory 4 Intended status: Experimental October 30, 2017 5 Expires: May 3, 2018 7 NEAT Sockets API 8 draft-dreibholz-taps-neat-socketapi-02.txt 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 http://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 May 3, 2018. 33 Copyright Notice 35 Copyright (c) 2017 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 (http://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 [11], [12], [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 [11], [12], 157 [13], [14], [15]. 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, struct sockaddr* addr, socklen_t* addrlen, 567 int flags) 569 Arguments: 571 sockfd: NEAT socket descriptor. 573 addr: Pointer to storage space to store the peer's primary address 574 to (or NULL, if address is not needed). 576 addrlen: Pointer to variable with size of the storage in "addr" (or 577 NULL, if address is not needed). 579 nsa_accept4() returns the new NEAT socket descriptor in case of 580 success, or -1 in case of error. The error code will be set in the 581 errno variable. In case of success, the peer's primary address is 582 stored in "addr", if there is sufficient space. The variable pointer 583 to by "addrlen" will then contain the actual address size. 585 See the accept() documentation for details. 587 3.14. nsa_shutdown() 589 nsa_shutdown() shuts down the connection of a given NEAT socket. 591 Function Prototype: 593 int nsa_shutdown(int sockfd, int how) 595 Arguments: 597 sockfd: NEAT socket descriptor. 599 how: Not used for NEAT sockets (set to SHUT_RDWR). 601 nsa_shutdown() returns 0 in case of success, or -1 in case of error. 602 The error code will be set in the errno variable. 604 See the shutdown() documentation for details. 606 4. Options Handling 608 4.1. nsa_getsockopt() 610 nsa_getsockopt() gets a socket option of a given NEAT socket. 612 Function Prototype: 614 int nsa_getsockopt(int sockfd, int level, int optname, 615 void* optval, socklen_t* optlen) 617 Arguments: 619 sockfd: NEAT socket descriptor. 621 level: Option level. 623 optname: Option number. 625 optval: Buffer to store option value to. 627 optlen: Pointer to variable with length of the buffer in "optval". 629 nsa_getsockopt() returns 0 in case of success, or -1 in case of 630 error. The error code will be set in the errno variable. 632 See the getsockopt() documentation for details. 634 4.2. nsa_setsockopt() 636 nsa_getsockopt() sets a socket option of a given NEAT socket. 638 Function Prototype: 640 int nsa_setsockopt(int sockfd, int level, int optname, 641 const void* optval, socklen_t optlen) 643 Arguments: 645 sockfd: NEAT socket descriptor. 647 level: Option level. 649 optname: Option number. 651 optval: Buffer with option value to set. 653 optlen: Length of buffer with option value. 655 nsa_setsockopt() returns 0 in case of success, or -1 in case of 656 error. The error code will be set in the errno variable. 658 See the setsockopt() documentation for details. 660 4.3. nsa_opt_info() 662 nsa_opt_info() gets a socket option of a given NEAT socket. 664 Function Prototype: 666 int nsa_opt_info(int sockfd, neat_assoc_t id, 667 int opt, void* arg, socklen_t* size) 669 Arguments: 671 sockfd: NEAT socket descriptor. 673 id: Association identifier (0 in case of 1:1-style sockets). 675 opt: Option number. 677 arg: Buffer to store option value to. 679 size: Pointer to variable with length of the buffer in "arg". 681 nsa_opt_info() returns 0 in case of success, or -1 in case of error. 682 The error code will be set in the errno variable. 684 See the sctp_opt_info() documentation for details. 686 5. Security 688 5.1. nsa_set_secure_identity() 690 TBD. 692 5.2. ... 694 TBD. 696 6. Input/Output Handling 698 6.1. nsa_write() 700 nsa_write() sends data over a given connected NEAT socket. For NEAT 701 sockets, nsa_write() is equal to nsa_send() with "flags" set to 0. 703 Function Prototype: 705 ssize_t nsa_write(int fd, const void* buf, size_t len) 707 Arguments: 709 fd: NEAT socket descriptor. 711 buf: Data to send. 713 len: Length of data to send. 715 nsa_write() returns the number of sent bytes in case of success, or 716 -1 in case of error. The error code will be set in the errno 717 variable. 719 See the write() documentation for details. 721 6.2. nsa_writev() 723 nsa_writev() sends data over a given connected NEAT socket. The data 724 is provided by an iovec structure. 726 Function Prototype: 728 ssize_t nsa_writev(int fd, const struct iovec* iov, int iovcnt) 730 Arguments: 732 sockfd: NEAT socket descriptor. 734 iov: Data to send provided as iovec structures. 736 iovcnt: Number of provided iovec structures. 738 nsa_writev() returns the number of sent bytes in case of success, or 739 -1 in case of error. The error code will be set in the errno 740 variable. 742 See the writev() documentation for details. 744 6.3. nsa_pwrite() 746 nsa_pwrite() is a wrapper around the pwrite() call, using a NEAT 747 socket descriptor instead. 749 Function Prototype: 751 ssize_t nsa_pwrite(int fd, const void* buf, size_t len, off_t offset) 753 See the pwrite() documentation for details. 755 6.4. nsa_pwrite64() 757 nsa_pwrite64() is a wrapper around the pwrite64() call, using a NEAT 758 socket descriptor instead. 760 Function Prototype: 762 ssize_t nsa_pwrite(int fd, const void* buf, size_t len, off64_t offset) 763 See the pwrite64() documentation for details. 765 6.5. nsa_pwritev() 767 nsa_pwritev() is a wrapper around the pwritev() call, using a NEAT 768 socket descriptor instead. 770 Function Prototype: 772 ssize_t nsa_pwritev(int fd, const struct iovec* iov, int iovcnt, 773 off_t offset) 775 See the pwritev() documentation for details. 777 6.6. nsa_pwritev64() 779 nsa_pwritev64() is a wrapper around the pwritev64() call, using a 780 NEAT socket descriptor instead. 782 Function Prototype: 784 ssize_t nsa_pwritev(int fd, const struct iovec* iov, int iovcnt, 785 off64_t offset) 787 See the pwritev64() documentation for details. 789 6.7. nsa_send() 791 nsa_send() sends data over a given connected NEAT socket. 793 Function Prototype: 795 ssize_t nsa_send(int sockfd, const void* buf, size_t len, int flags) 797 Arguments: 799 sockfd: NEAT socket descriptor. 801 buf: Data to send. 803 len: Length of data to send. 805 flags: Optional flags (0, if there are none). 807 nsa_send() returns the number of sent bytes in case of success, or -1 808 in case of error. The error code will be set in the errno variable. 810 See the send() documentation for details. 812 6.8. nsa_sendto() 814 nsa_sendto() is a wrapper around the sendto() call, using NEAT socket 815 descriptors instead. Note: this function is provided as legacy 816 wrapper, and it is RECOMMENDED to use nsa_send() instead. On NEAT 817 sockets, a provided destination address is ignored. 819 Function Prototype: 821 ssize_t nsa_sendto(int sockfd, const void* buf, size_t len, 822 int flags, 823 const struct sockaddr* to, socklen_t tolen) 825 Arguments: 827 sockfd: NEAT socket descriptor. 829 buf: Data to send. 831 len: Length of data to send. 833 flags: Optional flags (0, if there are none). 835 to: Address to send data to (ignored for NEAT sockets). 837 tolen: Length of address to send data to (ignored for NEAT sockets). 839 nsa_sendto() returns the number of sent bytes in case of success, or 840 -1 in case of error. The error code will be set in the errno 841 variable. 843 See the send() documentation for details. 845 6.9. nsa_sendmsg() 847 nsa_sendmsg() sends data over a given connected NEAT socket. The 848 data and control information is provided by a msghdr structure. On 849 NEAT sockets, a provided destination address is ignored. 851 Function Prototype: 853 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) 1481 See the lseek64() documentation for details. 1483 9.17. nsa_truncate() 1485 nsa_truncate() is a wrapper around the truncate() call, using a NEAT 1486 socket descriptor instead. 1488 Function Prototype: 1490 int nsa_ftruncate(int fd, off_t length) 1492 See the truncate() documentation for details. 1494 9.18. nsa_truncate64() 1496 nsa_truncate64() is a wrapper around the truncate64() call, using a 1497 NEAT socket descriptor instead. 1499 Function Prototype: 1501 int nsa_ftruncate(int fd, off64_t length) 1503 See the truncate64() documentation for details. 1505 9.19. nsa_pipe() 1507 nsa_pipe() is a wrapper around the pipe() call, returning NEAT socket 1508 descriptors instead. 1510 Function Prototype: 1512 int nsa_pipe(int fds[2]) 1514 See the pipe() documentation for details. 1516 9.20. nsa_ioctl() 1518 nsa_ioctl() is a wrapper around the ioctl() call, using a NEAT socket 1519 descriptor instead. 1521 Function Prototype: 1523 int nsa_ioctl(int fd, int request, const void* argp) 1525 See the ioctl() documentation for details. 1527 10. Code Examples 1529 Running code examples can be found in the NEAT Git repository, with 1530 some tutorial material in [10]: 1532 URL: https://github.com/NEAT-project/neat 1534 Branch: dreibh/neat-socketapi [2] 1536 Directory: socketapi/examples/ [3] 1538 11. Testbed Platform 1540 A large-scale and realistic Internet testbed platform with support 1541 for the multi-homing feature of the underlying SCTP and MPTCP 1542 protocols is NorNet. A description of NorNet is provided in [6], 1543 [7], some further information can be found on the project website 1544 [9]. 1546 12. Security Considerations 1548 Security considerations for the SCTP sockets API are described in 1549 [2]. 1551 13. IANA Considerations 1553 This document does not require IANA actions. 1555 14. Acknowledgments 1557 The author would like to thank David Ros, Michael Welzl, and Xing 1558 Zhou for their support. 1560 15. References 1562 15.1. Normative References 1564 [1] Bradner, S., "Key words for use in RFCs to Indicate 1565 Requirement Levels", BCP 14, RFC 2119, 1566 DOI 10.17487/RFC2119, March 1997, . 1569 [2] Stewart, R., Tuexen, M., Poon, K., Lei, P., and V. 1570 Yasevich, "Sockets API Extensions for the Stream Control 1571 Transmission Protocol (SCTP)", RFC 6458, 1572 DOI 10.17487/RFC6458, December 2011, . 1575 [3] Gjessing, S. and M. Welzl, "A Minimal Set of Transport 1576 Services for TAPS Systems", draft-gjessing-taps-minset-05 1577 (work in progress), June 2017. 1579 [4] Fairhurst, G., "The NEAT Interface to Transport Services", 1580 draft-fairhurst-taps-neat-00 (work in progress), October 1581 2017. 1583 [5] Welzl, M., Tuexen, M., and N. Khademi, "On the Usage of 1584 Transport Features Provided by IETF Transport Protocols", 1585 draft-ietf-taps-transports-usage-09 (work in progress), 1586 October 2017. 1588 15.2. Informative References 1590 [6] Dreibholz, T., "NorNet - Building an Inter-Continental 1591 Internet Testbed based on Open Source Software", 1592 Proceedings of the LinuxCon Europe, October 2016, 1593 . 1596 [7] Gran, E., Dreibholz, T., and A. Kvalbein, "NorNet Core - A 1597 Multi-Homed Research Testbed", Computer Networks, Special 1598 Issue on Future Internet Testbeds Volume 61, Pages 75-87, 1599 ISSN 1389-1286, DOI 10.1016/j.bjp.2013.12.035, March 2014, 1600 . 1602 [8] Dreibholz, T., "NEAT - A New, Evolutive API and Transport- 1603 Layer Architecture for the Internet", Online: 1604 https://www.neat-project.org/, 2017, . 1607 [9] Dreibholz, T., "NorNet - A Real-World, Large-Scale Multi- 1608 Homing Testbed", Online: https://www.nntb.no/, 2017, 1609 . 1611 [10] Dreibholz, T., "A Practical Introduction to NEAT at Hainan 1612 University", Invited Talk at Hainan University, College 1613 of Information Science and Technology (CIST), April 2017, 1614 . 1617 [11] Weinrank, F., Grinnemo, K., Bozakov, Z., Brunstroem, A., 1618 Dreibholz, T., Hurtig, P., Khademi, N., and M. Tuexen, "A 1619 NEAT Way to Browse the Web", Proceedings of the ACM, IRTF 1620 and ISOC Applied Networking Research Workshop (ANRW) Pages 1621 33-34, ISBN 978-1-4503-5108-9, 1622 DOI 10.1145/3106328.3106335, July 2017, 1623 . 1625 [12] Fairhurst, G., Jones, T., Bozakov, Z., Brunstroem, A., 1626 Damjanović, D., Eckert, K., Grinnemo, K., Hansen, A., 1627 Khademi, N., Mangiante, S., McManus, P., Papastergiou, G., 1628 Ros, D., Tuexen, M., Vyncke, E., and M. Welzl, "NEAT 1629 Architecture", Number D1.1, December 2015, 1630 . 1633 [13] Welzl, M., Brunstroem, A., Damjanović, D., Evensen, 1634 K., Eckert, T., Fairhurst, G., Khademi, N., Mangiante, S., 1635 Petlund, A., Ros, D., and M. Tuexen, "NEAT - First Version 1636 of Services and APIs", Number D1.2, March 2016, 1637 . 1640 [14] Khademi, N., Bozakov, Z., Brunstroem, A., Damjanović, 1641 D., Evensen, K., Fairhurst, G., Grinnemo, K., Jones, T., 1642 Mangiante, S., Papastergiou, G., Ros, D., Tuexen, M., and 1643 M. Welzl, "NEAT - First Version of Low-Level Core 1644 Transport System", Number D2.1, March 2016, 1645 . 1648 [15] Khademi, N., Bozakov, Z., Brunstroem, A., Dale, Oe., 1649 Damjanović, D., Evensen, K., Fairhurst, G., Grinnemo, 1650 K., Jones, T., Mangiante, S., Petlund, A., Ros, D., 1651 Stenberg, D., Tuexen, M., Weinrank, F., and M. Welzl, 1652 "NEAT - Core Transport System, with both Low-level and 1653 High-level Components", Number D2.2, March 2017, 1654 . 1657 15.3. URIs 1659 [2] https://github.com/NEAT-project/neat/tree/dreibh/neat-socketapi 1661 [3] https://github.com/NEAT-project/neat/tree/dreibh/neat- 1662 socketapi/socketapi/examples 1664 Author's Address 1666 Thomas Dreibholz 1667 Simula Research Laboratory, Network Systems Group 1668 Martin Linges vei 17 1669 1364 Fornebu, Akershus 1670 Norway 1672 Phone: +47-6782-8200 1673 Fax: +47-6782-8201 1674 Email: dreibh@simula.no 1675 URI: https://simula.no/people/dreibh