aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2024-03-29 12:50:46 -0700
committerDenis Kenzior <denkenz@gmail.com>2024-04-03 11:01:20 -0500
commit407309cf47f00744e9f9f251af0fab59e162d267 (patch)
tree1d277ae8133b5f260a59166ba9e0bca04307d0e4
parentc496380af19efbcb2840e9ffa0e3367251ed2b3d (diff)
downloadofono-407309cf47f00744e9f9f251af0fab59e162d267.tar.gz
provisiontool: Add support for context tags
Since this changes the size of the context structure, bump the version number generated by provisiontool.
-rwxr-xr-xtools/provisiontool10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/provisiontool b/tools/provisiontool
index 2067a66a9..c08b9c4b9 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)