Skip to content

Commit

Permalink
Merge pull request #1211 from ietf-tapswg/philsbln/endpointspec-basic…
Browse files Browse the repository at this point in the history
…typs

Make Endpoints consistent with basic types
  • Loading branch information
tfpauly authored Jul 6, 2023
2 parents 5fe9069 + 194befb commit 375198e
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions draft-ietf-taps-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ We also make use of the following basic types:
- Boolean: Instances take the value `true` or `false`.
- Integer: Instances take positive or negative integer values.
- Numeric: Instances take positive or negative real number values.
- String: Instances are represented in a way that is common to the programming
language, e.g. UTF-8.
- IP Address: An IPv4 or IPv6 address.
- Enumeration: A family of types in which each instance takes one of a fixed,
predefined set of values specific to a given enumerated type.
- Tuple: An ordered grouping of multiple value types, represented as a
Expand Down Expand Up @@ -733,11 +736,11 @@ RemoteSpecifier.WithService("https")
- IP address (IPv4 or IPv6 address):

~~~
RemoteSpecifier.WithIPv4Address(192.0.2.21)
RemoteSpecifier.WithIPAddress(192.0.2.21)
~~~

~~~
RemoteSpecifier.WithIPv6Address(2001:db8:4920:e29d:a420:7461:7073:0a)
RemoteSpecifier.WithIPAddress(2001:db8:4920:e29d:a420:7461:7073:0a)
~~~

- Interface name (string), e.g., to qualify link-local or multicast addresses (see {{ifspec}} for details):
Expand All @@ -747,7 +750,7 @@ LocalSpecifier.WithInterface("en0")
~~~

Note that an IPv6 address specified with a scope (e.g. `2001:db8:4920:e29d:a420:7461:7073:0a%en0`)
is equivalent to `WithIPv6Address` with an unscoped address and `WithInterface ` together.
is equivalent to `WithIPAddress` with an unscoped address and `WithInterface ` together.

The design of the API MUST NOT permit an Endpoint to be configured with multiple identifiers of the same type.
For example, an endpoint cannot have two IP addresses specified. Two separate IP addresses
Expand Down Expand Up @@ -788,8 +791,7 @@ multicast group.
The following API calls can be used to configure a Preconnection before calling `Initiate`:

~~~
RemoteSpecifier.WithMulticastGroupIPv4(GroupAddress)
RemoteSpecifier.WithMulticastGroupIPv6(GroupAddress)
RemoteSpecifier.WithMulticastGroupIP(GroupAddress)
RemoteSpecifier.WithPort(PortNumber)
RemoteSpecifier.WithTTL(TTL)
~~~
Expand All @@ -804,12 +806,9 @@ The receiving interface can be restricted by passing it as part of the LocalSpec
The following API calls can be used to configure a Preconnection before calling `Listen`:

~~~
LocalSpecifier.WithSingleSourceMulticastGroupIPv4(GroupAddress,
SourceAddress)
LocalSpecifier.WithSingleSourceMulticastGroupIPv6(GroupAddress,
SourceAddress)
LocalSpecifier.WithAnySourceMulticastGroupIPv4(GroupAddress)
LocalSpecifier.WithAnySourceMulticastGroupIPv6(GroupAddress)
LocalSpecifier.WithSingleSourceMulticastGroupIP(GroupAddress,
SourceAddress)
LocalSpecifier.WithAnySourceMulticastGroupIP(GroupAddress)
LocalSpecifier.WithPort(PortNumber)
~~~

Expand All @@ -827,12 +826,10 @@ group address as the Local Endpoint results in an `EstablishmentError`.
The following API calls can be used to configure a Preconnection before calling `Rendezvous`:

~~~
RemoteSpecifier.WithMulticastGroupIPv4(GroupAddress)
RemoteSpecifier.WithMulticastGroupIPv6(GroupAddress)
RemoteSpecifier.WithMulticastGroupIP(GroupAddress)
RemoteSpecifier.WithPort(PortNumber)
RemoteSpecifier.WithTTL(TTL)
LocalSpecifier.WithAnySourceMulticastGroupIPv4(GroupAddress)
LocalSpecifier.WithAnySourceMulticastGroupIPv6(GroupAddress)
LocalSpecifier.WithAnySourceMulticastGroupIP(GroupAddress)
LocalSpecifier.WithPort(PortNumber)
LocalSpecifier.WithTTL(TTL)
~~~
Expand Down Expand Up @@ -901,15 +898,15 @@ Specify a Remote Endpoint using an IPv6 address and remote port:

~~~
RemoteSpecifier := NewRemoteEndpoint()
RemoteSpecifier.WithIPv6Address(2001:db8:4920:e29d:a420:7461:7073:0a)
RemoteSpecifier.WithIPAddress(2001:db8:4920:e29d:a420:7461:7073:0a)
RemoteSpecifier.WithPort(443)
~~~

Specify a Remote Endpoint using an IPv4 address and remote port:

~~~
RemoteSpecifier := NewRemoteEndpoint()
RemoteSpecifier.WithIPv4Address(192.0.2.21)
RemoteSpecifier.WithIPAddress(192.0.2.21)
RemoteSpecifier.WithPort(443)
~~~

Expand Down Expand Up @@ -945,7 +942,7 @@ port on a named local interface:
RemoteSpecifier := NewRemoteEndpoint()

LocalSpecifier := NewLocalEndpoint()
LocalSpecifier.WithAnySourceMulticastGroupIPv4(233.252.0.0)
LocalSpecifier.WithAnySourceMulticastGroupIP(233.252.0.0)
LocalSpecifier.WithPort(5353)
LocalSpecifier.WithInterface("en0")

Expand All @@ -966,8 +963,9 @@ port on a named local interface:
RemoteSpecifier := NewRemoteEndpoint()

LocalSpecifier := NewLocalEndpoint()
LocalSpecifier.WithSingleSourceMulticastGroupIPv4(233.252.0.0,
198.51.100.10)

LocalSpecifier.WithSingleSourceMulticastGroupIP(233.252.0.0,
198.51.100.10)
LocalSpecifier.WithPort(5353)
LocalSpecifier.WithInterface("en0")

Expand All @@ -985,12 +983,12 @@ Create a Source-Specific Multicast group as a sender:

~~~
RemoteSpecifier := NewRemoteEndpoint()
RemoteSpecifier.WithMulticastGroupIPv4(232.1.1.1)
RemoteSpecifier.WithMulticastGroupIP(232.1.1.1)
RemoteSpecifier.WithPort(5353)
RemoteSpecifier.WithTTL(8)

LocalSpecifier := NewLocalEndpoint()
LocalSpecifier.WithIPv4Address(192.0.2.22)
LocalSpecifier.WithIPAddress(192.0.2.22)
LocalSpecifier.WithInterface("en0")

TransportProperties := ...
Expand All @@ -1007,13 +1005,13 @@ Join an any-source multicast group as both a sender and a receiver:

~~~
RemoteSpecifier := NewRemoteEndpoint()
RemoteSpecifier.WithMulticastGroupIPv4(233.252.0.0)
RemoteSpecifier.WithMulticastGroupIP(233.252.0.0)
RemoteSpecifier.WithPort(5353)
RemoteSpecifier.WithTTL(8)

LocalSpecifier := NewLocalEndpoint()
LocalSpecifier.WithAnySourceMulticastGroupIPv4(233.252.0.0)
LocalSpecifier.WithIPv4Address(192.0.2.22)
LocalSpecifier.WithAnySourceMulticastGroupIP(233.252.0.0)
LocalSpecifier.WithIPAddress(192.0.2.22)
LocalSpecifier.WithPort(5353)
LocalSpecifier.WithInterface("en0")

Expand Down

0 comments on commit 375198e

Please sign in to comment.