mirror of
https://github.com/Py-KMS-Organization/py-kms.git
synced 2025-06-07 21:15:25 +02:00
A Great Update: py-kms_2019-05-15
This commit is contained in:
parent
698353f800
commit
660d86d42b
23 changed files with 6589 additions and 991 deletions
45
py-kms/pykms_RpcBase.py
Normal file
45
py-kms/pykms_RpcBase.py
Normal file
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
class rpcBase:
|
||||
packetType = {
|
||||
'request': 0,
|
||||
'ping': 1,
|
||||
'response': 2,
|
||||
'fault': 3,
|
||||
'working': 4,
|
||||
'nocall': 5,
|
||||
'reject': 6,
|
||||
'ack': 7,
|
||||
'clCancel': 8,
|
||||
'fack': 9,
|
||||
'cancelAck': 10,
|
||||
'bindReq': 11,
|
||||
'bindAck': 12,
|
||||
'bindNak': 13,
|
||||
'alterContext': 14,
|
||||
'alterContextResp': 15,
|
||||
'shutdown': 17,
|
||||
'coCancel': 18,
|
||||
'orphaned': 19
|
||||
}
|
||||
|
||||
packetFlags = {
|
||||
'firstFrag': 1, # 0x01
|
||||
'lastFrag': 2, # 0x02
|
||||
'cancelPending': 4, # 0x04
|
||||
'reserved': 8, # 0x08
|
||||
'multiplex': 16, # 0x10
|
||||
'didNotExecute': 32, # 0x20
|
||||
'maybe': 64, # 0x40
|
||||
'objectUuid': 128 # 0x80
|
||||
}
|
||||
|
||||
def __init__(self, data, srv_config):
|
||||
self.data = data
|
||||
self.srv_config = srv_config
|
||||
|
||||
def populate(self):
|
||||
return self.generateResponse(self.parseRequest())
|
||||
|
||||
def parseRequest(self):
|
||||
return {}
|
Loading…
Add table
Add a link
Reference in a new issue