A Socket Intents Prototype for the BSD Socket API - Experiences, Lessons Learned and Considerations
draft-tiesel-taps-socketintents-bsdsockets-00

Document Type Active Internet-Draft (individual)
Last updated 2017-07-03
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
TAPS Working Group                                             P. Tiesel
Internet-Draft                                               T. Enghardt
Intended status: Informational            Berlin Institute of Technology
Expires: January 4, 2018                                   July 03, 2017

A Socket Intents Prototype for the BSD Socket API - Experiences, Lessons
                       Learned and Considerations
             draft-tiesel-taps-socketintents-bsdsockets-00

Abstract

   This document describes a prototype implementation of Socket Intents
   [I-D.tiesel-taps-socketintents] for the BSD Socket API as an
   illustrative example how Socket Intents could be implemented.  It
   described the experiences made with the prototype and lessons learned
   from trying to extend the BSD Socket API.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on January 4, 2018.

Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of

Tiesel & Enghardt        Expires January 4, 2018                [Page 1]
Internet-Draft       Socket Intents for BSD Sockets            July 2017

   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Prototype Architecture  . . . . . . . . . . . . . . . . . . .   3
   3.  Multiple Access Manager . . . . . . . . . . . . . . . . . . .   4
     3.1.  Policy  . . . . . . . . . . . . . . . . . . . . . . . . .   5
     3.2.  Path characteristics data collectors  . . . . . . . . . .   6
   4.  Socket Intents Representation . . . . . . . . . . . . . . . .   7
   5.  The Socket Intents API Variants . . . . . . . . . . . . . . .   7
     5.1.  Classic API / muacc_context . . . . . . . . . . . . . . .   8
       5.1.1.  muacc_getaddrinfo() . . . . . . . . . . . . . . . . .   8
       5.1.2.  muacc_socket()  . . . . . . . . . . . . . . . . . . .   9
       5.1.3.  muacc_setsockopt()  . . . . . . . . . . . . . . . . .  10
       5.1.4.  muacc_connect() . . . . . . . . . . . . . . . . . . .  10
       5.1.5.  muacc_close() . . . . . . . . . . . . . . . . . . . .  11
     5.2.  Classic API / getaddrinfo . . . . . . . . . . . . . . . .  11
     5.3.  Socketconnect API . . . . . . . . . . . . . . . . . . . .  14
   6.  API Implementation Experiences & Lessons Learned  . . . . . .  15
     6.1.  The Missing Link to Name Resolution . . . . . . . . . . .  15
     6.2.  File Descriptors Considered Harmful . . . . . . . . . . .  16
     6.3.  Asynchronous API Anarchy  . . . . . . . . . . . . . . . .  17
     6.4.  Here Be Dragons hiding in Shadow Structures . . . . . . .  17
   7.  Conclusion  . . . . . . . . . . . . . . . . . . . . . . . . .  18
   8.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  18
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  18
     9.1.  Informative References  . . . . . . . . . . . . . . . . .  18
     9.2.  URIs  . . . . . . . . . . . . . . . . . . . . . . . . . .  19
   Appendix A.  API Usage Examples . . . . . . . . . . . . . . . . .  19
     A.1.  Usage Example of the Classic / muacc_context API  . . . .  19
     A.2.  Usage Example of the Classic / getaddrinfo API  . . . . .  21
     A.3.  Usage Example of the Socketconnect API  . . . . . . . . .  22
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  23

1.  Introduction

   With the proliferation of devices that have multiple paths to the
   internet and an increasing number of transport protocols available,
   the number of transport options to serve a communication unit
   explodes.  Implementing a heuristic or strategy for choosing from
   this overwhelming set of transport options by each application puts a
   huge burden on the application developer.  Thus, the decisions
Show full document text