New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for identifying devices by id such as mac address #5646
Changes from 4 commits
590388d
adc9545
bf77096
1127b08
eb22024
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,16 +144,20 @@ def printSummary(self, msg, typestr): | |
if requestor: | ||
requestorstr = ' (' + requestor + ')' | ||
|
||
print('[%s] %s of size %d: %s%s -> %s (%s), id: %d, uuid: %s%s' % (datestr, | ||
typestr, | ||
msg.inBytes, | ||
ipfromstr, | ||
requestorstr, | ||
iptostr, | ||
protostr, | ||
msg.id, | ||
messageidstr, | ||
initialrequestidstr)) | ||
deviceId = binascii.hexlify(bytearray(msg.deviceId)) | ||
requestorId = msg.requestorId | ||
|
||
print('[%s] %s of size %d: %s%s -> %s (%s), id: %d, uuid: %s%s ' | ||
'requestorid: %s deviceid: %s' % (datestr, | ||
typestr, | ||
msg.inBytes, | ||
ipfromstr, | ||
requestorstr, | ||
iptostr, | ||
protostr, | ||
msg.id, | ||
messageidstr, | ||
initialrequestidstr)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. requestorid and deviceid are missing in this parameter list There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
With: - initialrequestidstr))
+ initialrequestidstr, requestorId, deviceId)) |
||
|
||
def getRequestorSubnet(self, msg): | ||
requestorstr = None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if
msg.deviceId
is empty?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python protobuf returns empty python string