From patchwork Wed Apr 3 16:05:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Kenzior X-Patchwork-Id: 13616434 Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85C1714D29F for ; Wed, 3 Apr 2024 16:06:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712160367; cv=none; b=YNUW79BG6nWX5W7Mhe9x7bk1ET3VuK5AKLQjG2C9Mlsel6YxAQbwKuPkX32CzMTX6YhS8b2GIDSFv/dUxpRQCIYGktPCaAWDejcEOmXS4RmbtGxHd14jMTam/1xPdYyTr7xTubmC/rGr1yBbGTWODxHJT/TmUcRXvFjdL6w/wQg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712160367; c=relaxed/simple; bh=sTP3HQTlWVgoLKVHjbAHwN55h/yTrk0VgaPXBstLQQc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Br3fyOAix4gA70mTxSkGxUrajBZpJjCDmggXCfzvunUb+BYNs7beyx/g0fHP7sdpUh00uCRy8h3qqArBdnw7qk2DnPaa0ob4BKeqEgIptFBKU5Xtod4Up4QFr+e6zmNxrDocRe2knDa3PinMhaQajE0ZpCG0Ee9aliZnmCvBq8c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eu4+7gl5; arc=none smtp.client-ip=209.85.210.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eu4+7gl5" Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-6e89e48d2c0so4911a34.1 for ; Wed, 03 Apr 2024 09:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712160364; x=1712765164; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OJegCb221tkm/+wPfRA3j/tohFSI41UxlLHaLAgSOr0=; b=eu4+7gl5vwpoEO68qZkAiWzhaquOGq9p2ZyVn1G8fmoFUNYEazDd5CAdaId+0KIoye qhKDrULrS+tnXI3G9Ca9ZV9FvxO7AIrDHxbvHlqtHwkw3t9laZ1AvON5lPfjDoquoK/4 uzBbGE2Uz3WK5bBRD3sgOCpI/r9vR7QX6CVTpj83H5jZyd/Y2dHXaVsBLGUGcwmOx34q wb/r2pWNs3xvIDxoiMTbZhK5VgB1hTTwv7oFBgi6s6AXgeuk31wV6Afbe6BEgTnaknid O8/HZo91GbO1qHdv/D8jDfGdksZmlITGHaAB+ozGcmJGqN0cGoYzhzVTL9QXuTxNH0aS qqbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712160364; x=1712765164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OJegCb221tkm/+wPfRA3j/tohFSI41UxlLHaLAgSOr0=; b=Jg8xeZYfPwWupwyhiykt2qsfZ9FIpm+e35LaAfkGb8rsp43YC1YmCkBLLL7gABBIhF BCOzgkeM2HAIWoARapSskHuSqN9shuBCYz5KYR4bUyXbclp31NZ+0ZdkYyXf8kcSgM5x yfU6KNOFFeT+nV0yx6tvLTj1LKLYRCbIFPJEKEoPqT2Y1T+4zIzt4i8jSY+vAwc9FMXj k8X6/O0ii372COhyIAnRxC433RGdTQaJC41+7xDsIARofgvDLycFf8xx8PMKvA1GEAsG Fcy+3XE255wrk9ovkglly1Ry6bO4m/jAwrx60uCjdQlF8CuFmqHRmKiCmpfMXvkQUeYL nNsA== X-Gm-Message-State: AOJu0YxFmIZt5vN/0k+5qbjnbdD4yah3z5k5wk5ZqxMyd6TUUcUk0gvW 02V7OUpUutt7does+PRS77yl0YjQONGs1D21ZC6/8xH2p4s85kbqyUO/RclR X-Google-Smtp-Source: AGHT+IEt7MeSU/pUs7/1MhV8nX75qt4efHpwrbrtVFFH+L7NfVbfq7nNZfsFCgpoZ+rD36MhTrUYgQ== X-Received: by 2002:a9d:7693:0:b0:6e6:9738:6b71 with SMTP id j19-20020a9d7693000000b006e697386b71mr15186418otl.1.1712160364358; Wed, 03 Apr 2024 09:06:04 -0700 (PDT) Received: from localhost.localdomain (070-114-247-242.res.spectrum.com. [70.114.247.242]) by smtp.gmail.com with ESMTPSA id a15-20020a056830100f00b006e6b018a703sm2653635otp.79.2024.04.03.09.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 09:06:04 -0700 (PDT) From: Denis Kenzior To: ofono@lists.linux.dev Cc: Denis Kenzior Subject: [PATCH v2 07/14] provisiontool: Add support for context tags Date: Wed, 3 Apr 2024 11:05:30 -0500 Message-ID: <20240403160557.2828145-7-denkenz@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240403160557.2828145-1-denkenz@gmail.com> References: <20240403160557.2828145-1-denkenz@gmail.com> Precedence: bulk X-Mailing-List: ofono@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Since this changes the size of the context structure, bump the version number generated by provisiontool. --- tools/provisiontool | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/provisiontool b/tools/provisiontool index 2067a66a9951..c08b9c4b9712 100755 --- a/tools/provisiontool +++ b/tools/provisiontool @@ -24,7 +24,8 @@ class ProviderInfo: 'mmsproxy', 'authentication', 'username', - 'password'] ) } + 'password', + 'tags'] ) } @classmethod def rawimport(cls, entry): @@ -228,12 +229,13 @@ class ProvisionContext(ctypes.LittleEndianStructure): ('username_offset', ctypes.c_uint64), ('password_offset', ctypes.c_uint64), ('mmsproxy_offset', ctypes.c_uint64), - ('mmsc_offset', ctypes.c_uint64) + ('mmsc_offset', ctypes.c_uint64), + ('tags_offset', ctypes.c_uint64), ] authentication_dict = { 'chap' : 0, 'pap' : 1, 'none' : 2 } protocol_dict = { 'ipv4' : 0, 'ipv6' : 1, 'ipv4v6' : 2 } - attrs = ['name', 'apn', 'username', 'password', 'mmsproxy', 'mmsc'] + attrs = ['name', 'apn', 'username', 'password', 'mmsproxy', 'mmsc', 'tags'] @classmethod def type_to_context_type(cls, types): @@ -515,7 +517,7 @@ class ProvisionDatabase(ctypes.LittleEndianStructure): visitor.visit(self.tree.root) self.tree.traverse(visitor) - self.version = 1 + self.version = 2 self.header_size = ctypes.sizeof(ProvisionDatabase) self.file_size = self.header_size self.node_struct_size = ctypes.sizeof(ProvisionNode)