diff mbox series

[v2,07/14] provisiontool: Add support for context tags

Message ID 20240403160557.2828145-7-denkenz@gmail.com (mailing list archive)
State Accepted
Commit 407309cf47f00744e9f9f251af0fab59e162d267
Headers show
Series [v2,01/14] simutil: Convert eons APIs to use ell | expand

Commit Message

Denis Kenzior April 3, 2024, 4:05 p.m. UTC
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 mbox series

Patch

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)