RE: How to parse cid if cid length change

Mike Bishop <mbishop@evequefou.be> Thu, 16 January 2020 20:26 UTC

Return-Path: <mbishop@evequefou.be>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 53108120071 for <quic@ietfa.amsl.com>; Thu, 16 Jan 2020 12:26:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=evequefou.onmicrosoft.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 c80x7qjRHBjg for <quic@ietfa.amsl.com>; Thu, 16 Jan 2020 12:26:11 -0800 (PST)
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2092.outbound.protection.outlook.com [40.107.93.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 248FF12004C for <quic@ietf.org>; Thu, 16 Jan 2020 12:26:10 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OAZwfj6H1/OPtPVewIUBKAeJEWkvl0f6EqzwzUuLFjAz7U8/lGhUkFxi4PnypEOSnobM1VrBJ4BK+2TiNT1iW2E00EVRu2lUpBhiCWjniRDEsRgRtT7oECPNqop9tRh9SWjvUeBRsUxUSnF9941QyaEZhEl1K70dx/2ZlV37ycvEKmn6RnbUHBtyXhnRpbw6RNn7G612w/7vmHEs5u9ZlAbDgFEqRxNeS8fApLvDNWY4fRTebMH9q6OGfs9DYIGiLmWFsFG3MpMhxBbobFR479axpEr1p1MeqO3zAD8uk+MroM5ZxfndQRq/uZJoYUmB+mNY+rfrbbu8i/bhvSHclA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XFWIBF1X/tFlU6hZki8e0rMHTisk8zd5JUHFoWHb6U0=; b=SFFdu2GoW1hCVwMnJZFqzqH/bC5/KihpGb36F8uyRlk1Ly5wGACCtv4j+yTnRq+4j4Y09vIf17aWuCXd7znFOzcORjeU5UlSNI1w5/LrDyosS6jHPOXqi232iN81xG0mBOQ0KyGvjRc3qnicPbqe014ofj+esiP+b9mo6oRg/5PY4UYl249rK8+A4o3bZYyJbl5QEnA2VTTkaLXzDJc67V2PfGk6uyHvd/RwSYRJQoMTOiKzBPBsT3Oa2KYmzUfL2S451C2FnV40msokA8y1kyvHAG0Xf+i8vGQc5mXTWC9ihLC51dwbD+nXia2H9paAm2uCdro6X18suhWrmQkAUw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=evequefou.be; dmarc=pass action=none header.from=evequefou.be; dkim=pass header.d=evequefou.be; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evequefou.onmicrosoft.com; s=selector2-evequefou-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XFWIBF1X/tFlU6hZki8e0rMHTisk8zd5JUHFoWHb6U0=; b=pjQ7QNCp5F+E9R6RZPvEOzfPmJSP6bAGx+dmJSLVot4/X5oDpe1PrwsbWTRucFdVsHSyu3LcWlh6f8PvQY8Ra0OhQnxYzO/OV4+zm4kQ4cUzy9py6WfWWtjgKsGv4kmg75Vg4sCDiNazxTj42mjY26QCVTnCKCJQBao+nAidai8=
Received: from CH2PR22MB2086.namprd22.prod.outlook.com (20.180.11.136) by CH2PR22MB1960.namprd22.prod.outlook.com (20.180.8.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18; Thu, 16 Jan 2020 20:26:08 +0000
Received: from CH2PR22MB2086.namprd22.prod.outlook.com ([fe80::fc4c:de9:3fcd:96dd]) by CH2PR22MB2086.namprd22.prod.outlook.com ([fe80::fc4c:de9:3fcd:96dd%7]) with mapi id 15.20.2644.015; Thu, 16 Jan 2020 20:26:07 +0000
From: Mike Bishop <mbishop@evequefou.be>
To: Lars Eggert <lars@eggert.org>, Jiuhai Zhang <jiuhai.zhang@gmail.com>
CC: "quic@ietf.org" <quic@ietf.org>
Subject: RE: How to parse cid if cid length change
Thread-Topic: How to parse cid if cid length change
Thread-Index: AQHVzHItvjXa168scEy9r8IiPcVpy6ftTHeAgABwyWA=
Date: Thu, 16 Jan 2020 20:26:07 +0000
Message-ID: <CH2PR22MB20860FFFC43CB704BC5C3BC5DA360@CH2PR22MB2086.namprd22.prod.outlook.com>
References: <CAG9+TpZ_x7kRDAYxnBvNmxaM2jFVhrzoQ2qNfoiXCiSWQYSw3Q@mail.gmail.com> <40A4DD99-2AFD-4B00-A636-C9F8473CAE5E@eggert.org>
In-Reply-To: <40A4DD99-2AFD-4B00-A636-C9F8473CAE5E@eggert.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=mbishop@evequefou.be;
x-originating-ip: [2600:2b00:9327:7d01:2d2c:b58e:713d:b7a9]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: ae8c88a5-2d50-4cbd-4380-08d79ac25171
x-ms-traffictypediagnostic: CH2PR22MB1960:
x-microsoft-antispam-prvs: <CH2PR22MB1960F3EE458F0E6C2377D483DA360@CH2PR22MB1960.namprd22.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:4303;
x-forefront-prvs: 02843AA9E0
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39830400003)(136003)(396003)(346002)(366004)(376002)(199004)(189003)(4744005)(52536014)(81166006)(81156014)(4326008)(9686003)(8676002)(55016002)(5660300002)(4001150100001)(8936002)(66476007)(316002)(71200400001)(66946007)(66446008)(64756008)(76116006)(86362001)(508600001)(110136005)(2906002)(66556008)(53546011)(6506007)(33656002)(186003)(7696005); DIR:OUT; SFP:1102; SCL:1; SRVR:CH2PR22MB1960; H:CH2PR22MB2086.namprd22.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: evequefou.be does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: vG90TpaR+i0bJtOx1NxnJWgxQFlsVr7ivFPcu2c98bnJN6T10U96/RAO8CDMGnVtokErLCYbntsqHOxbZ5kih93s9bGaVQfd5VQo1DtwC5yYvykbV5ksCtxeysQpb5BhqUuCDAVUnBmvtmTndqNggomKNKbTsq4d3eURlw/sG4ig8SWOWgdbaatwr0CR7gWgrNUVEyu7B4lbWQ6Nizqmt9Lv+sIfm+nkPgT3ol7StSPlY8CySxwZACYBX5Q7fmuu5POV8FCHMiUuB0QV4XC+Xk6DEecUrAoR3wL159fLdjnPkh+3U/ObzxYwteihxwFUl1hXdQm2NYKMcWe5ooezI0L99H4qOA2H2Ts5TG3JgVL9KfYSNgGRZ0qYxQEhWMnXd5CycnR3Sd6KP8stULqZLAfFISCpP0ojwNl1XPFlMyj6PcELd7MJaG8okhATHwan
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: evequefou.be
X-MS-Exchange-CrossTenant-Network-Message-Id: ae8c88a5-2d50-4cbd-4380-08d79ac25171
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2020 20:26:07.4286 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 5n7D2htISb68JHOWw6qqk7XtPHUJsumkXchrDEcx96tey7VhQivirC5lNPS7zPBN8vYXumWguyzV8l2tE0AnVw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR22MB1960
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/GAGk3DV1Mq-9dn0njKKiaph8iGo>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Jan 2020 20:26:16 -0000

Note that, since your implementation chooses the CIDs, you could opt to remember by embedding the length in the CID itself -- use the first few bits to indicate which of the sizes you support was chosen.

-----Original Message-----
From: QUIC <quic-bounces@ietf.org> On Behalf Of Lars Eggert
Sent: Thursday, January 16, 2020 8:42 AM
To: Jiuhai Zhang <jiuhai.zhang@gmail.com>
Cc: quic@ietf.org
Subject: Re: How to parse cid if cid length change

Hi,

On 2020-1-16, at 15:37, Jiuhai Zhang <jiuhai.zhang@gmail.com> wrote:
>     We cannot get cid length in short header packet, how can we parse cid from short header packet? Long header packet has cid length, but we can't find the connection before cid parsed.

your endpoint chooses the destination CID the peer includes in packets it sends to you. You need to remember what length you chose.

Lars