[Anima-signaling] Consolidated GRASP examples

Brian E Carpenter <brian.e.carpenter@gmail.com> Fri, 21 October 2016 01:18 UTC

Return-Path: <brian.e.carpenter@gmail.com>
X-Original-To: anima-signaling@ietfa.amsl.com
Delivered-To: anima-signaling@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2DD271293F2 for <anima-signaling@ietfa.amsl.com>; Thu, 20 Oct 2016 18:18:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n8QHkyIYELLR for <anima-signaling@ietfa.amsl.com>; Thu, 20 Oct 2016 18:18:44 -0700 (PDT)
Received: from mail-pf0-x236.google.com (mail-pf0-x236.google.com [IPv6:2607:f8b0:400e:c00::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B8817129454 for <anima-signaling@ietf.org>; Thu, 20 Oct 2016 18:18:43 -0700 (PDT)
Received: by mail-pf0-x236.google.com with SMTP id e6so46420895pfk.3 for <anima-signaling@ietf.org>; Thu, 20 Oct 2016 18:18:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:organization:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=gNhbgEeRX3+0QQvd1AeFQwd9xUNoUiY73FQr+tOGAPc=; b=ZhdjvqIuN+Myyue1M1iPjj8XF/LCZpjxNK4FKabNUex3XSxCDz37VUMqZ/IxT+w9No bpY96/7Vvzc2rwN8aLIZnA5oZaGlIZCognzYq0ntVqFvoVzdXmTy0ro0dRoc5rcpL7xy 88fxEDUBeVJrvdGlkf0sTKKowtiwgdJP2ufVaco6/HG1/cSTMPhaTY0jXRO9/yRRcGYI I/Snv9HQHIB+68ghx7xCw08u8e6OjBgOsgoSzvA7TcBMGizVVqsSw+4Y7rBvQLYDyNFB wluRrZetCMTg2dlnE3279Ab8dxKOw9Lyt9ZgXnV8l5aMblxX9Q340IEoyKDrjfgw1Rav 6TEg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:organization:message-id:date :user-agent:mime-version:content-transfer-encoding; bh=gNhbgEeRX3+0QQvd1AeFQwd9xUNoUiY73FQr+tOGAPc=; b=J1yqNJ5lc5tbARy1h9Z/L5XmKhhtrdsuvaYrevwN5L2IuIt8OLA2G4XFISoaNQcrt/ KKNBKnRuWh4E0wFmhpg0KUCI/a64i9+tHj3NasIG7+zu3/p5HYvQiy5DCpSUTnJleZOP W1ckKtvPtLcf+S2YpZCWWfi0DbYgjeQRRf2I5MGRIFCO2yhXYO4Tyem+2GsWq12diSJk n8jDVSWjZOBurow2Pl/RNDs9bhoyU5egZvMaT2/0QTMVXShYbfsA8rTLYBX4mSPiRHRB 7SbxEE4Du7CiUevOxy9PzDgWLDSGWQhpZNJ62AVJ7stHmji1gYpnKdGj/vPd07QypKNw ibbw==
X-Gm-Message-State: AA6/9Rk6Zd3R9HSThemWyD/FpUiGtKPobcg85jhNNbC62VSSCoNCEzDEEyPCNAn9I4u37w==
X-Received: by 10.99.9.129 with SMTP id 123mr5263831pgj.84.1477012722718; Thu, 20 Oct 2016 18:18:42 -0700 (PDT)
Received: from [192.168.178.23] (214.218.69.111.dynamic.snap.net.nz. [111.69.218.214]) by smtp.gmail.com with ESMTPSA id c15sm87475pfd.53.2016.10.20.18.18.40 for <anima-signaling@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 18:18:42 -0700 (PDT)
To: Anima signaling DT <anima-signaling@ietf.org>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Organization: University of Auckland
Message-ID: <5c680521-5d25-0e92-1c3f-11a1c32c9e33@gmail.com>
Date: Fri, 21 Oct 2016 14:18:48 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima-signaling/YH5pP_bgAD-tCSCde2qL7Jdju3Q>
Subject: [Anima-signaling] Consolidated GRASP examples
X-BeenThere: anima-signaling@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Mailing list for the signaling design team of the ANIMA WG <anima-signaling.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima-signaling>, <mailto:anima-signaling-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima-signaling/>
List-Post: <mailto:anima-signaling@ietf.org>
List-Help: <mailto:anima-signaling-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima-signaling>, <mailto:anima-signaling-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Oct 2016 01:18:46 -0000

Here are the examples I've generated, with a little text, for the
proposed appendix in the GRAFT draft.

OK? Carsten, do you have any better ideas of how to present examples?

Thanks
    Brian

This appendix shows a number of example GRASP messages conforming to the CDDL syntax given
in section XXX. Each message is shown three times in the following formats:

1) CBOR diagnostic notation.
2) Similar, but showing the names of the constants.
3) Hexadecimal version of the wire format.

Discovery example

The initiator multicasts a discovery message:

[1, 13948744, h'20010db8f000baaa28ccdc4c97036781', ["EX1", 2, 2, 0]]
[M_DISCOVERY, 13948744, h'20010db8f000baaa28ccdc4c97036781', ["EX1", F_SYNCH, 2, 0]]
h'84011a00d4d7485020010db8f000baaa28ccdc4c970367818463455831020200'

A peer responds:

[2, 13948744, h'20010db8f000baaa28ccdc4c97036781', 60000, [103, h'20010db8f000baaaf000baaaf000baaa', 6, 49443]]
[M_RESPONSE, 13948744, h'20010db8f000baaa28ccdc4c97036781', 60000, [O_IPv6_LOCATOR, h'20010db8f000baaaf000baaaf000baaa',
IPPROTO_TCP, 49443]]
h'85021a00d4d7485020010db8f000baaa28ccdc4c9703678119ea608418675020010db8f000baaaf000baaaf000baaa0619c123'

Flood example

The initiator multicasts a flood message. There is no response:

[9, 3504974, h'20010db8f000baaa28ccdc4c97036781', 10000, [], ["EX1", 2, 2, ["Example 1 value=", 100]]]
[M_FLOOD, 3504974, h'20010db8f000baaa28ccdc4c97036781', 10000, [], ["EX1", F_SYNCH, 2, ["Example 1 value=", 100]]]
h'86091a00357b4e5020010db8f000baaa28ccdc4c97036781192710808463455831020282704578616d706c6520312076616c75653d1864'

Synchronization example

The initiator unicasts a request:

[4, 4038926, ["EX2", 2, 5, 0]]
[M_REQ_SYN, 4038926, ["EX2", F_SYNCH, 5, 0]]
h'83041a003da10e8463455832020500'

The peer responds:

[8, 4038926, ["EX2", 2, 5, ["Example 2 value=", 200]]]
[M_SYNCH, 4038926, ["EX2", F_SYNCH, 5, ["Example 2 value=", 200]]]
h'83081a003da10e8463455832020582704578616d706c6520322076616c75653d18c8'

Negotiation example (simple)

The initiator unicasts a request:

[3, 802813, ["EX3", 1, 6, ["NZD", 47]]]
[M_REQ_NEG, 802813, ["EX3", 1, 6, ["NZD", 47]]]
h'83031a000c3ffd8463455833010682634e5a44182f'

The peer responds with immediate acceptance:

[6, 802813, [101]]
[M_END , 802813, [O_ACCEPT]]
h'83061a000c3ffd811865'

Negotiation example (not so simple)

The initiator unicasts a request:

[3, 13767778, ["EX3", 1, 6, ["NZD", 410]]]
[M_REQ_NEG, 13767778, ["EX3", F_NEG, 6, ["NZD", 410]]]
h'83031a00d214628463455833010682634e5a4419019a'

The responder starts to negotiate (making an offer):

[5, 13767778, ["EX3", 1, 6, ["NZD", 80]]]
[M_NEGOTIATE, 13767778, ["EX3", F_NEG, 6, ["NZD", 80]]]
h'83051a00d214628463455833010682634e5a441850'

The initiator continues to negotiate (reducing its request):

[5, 13767778, ["EX3", 1, 5, ["NZD", 307]]]
[M_NEGOTIATE, 13767778, ["EX3", F_NEG, 5, ["NZD", 307]]]
h'83051a00d214628463455833010582634e5a44190133'

The responder asks for more time:

[7, 13767778, 34965]
[M_WAIT, 13767778, 34965]
h'83071a00d21462198895'

The responder continues to negotiate (increasing its offer):

[5, 13767778, ["EX3", 1, 4, ["NZD", 120]]]
[M_NEGOTIATE, 13767778, ["EX3", F_NEG, 4, ["NZD", 120]]]
h'83051a00d214628463455833010482634e5a441878'

The initiator continues to negotiate (reducing its request):

[5, 13767778, ["EX3", 1, 3, ["NZD", 246]]]
[M_NEGOTIATE, 13767778, ["EX3", F_NEG, 3, ["NZD", 246]]]
h'83051a00d214628463455833010382634e5a4418f6'

The responder refuses to negotiate further:

[6, 13767778, [102, "Insufficient funds"]]
[M_END , 13767778, [O_DECLINE, "Insufficient funds"]]
h'83061a00d2146282186672496e73756666696369656e742066756e6473'

This negotiation has failed.

(end)