diff options
author | Mike Crute <mcrute@gmail.com> | 2016-08-16 20:42:45 -0700 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2016-08-16 20:42:45 -0700 |
commit | 50139f4f0a5c97102c360493a4622679209cb1e4 (patch) | |
tree | 01b658fa39fcb7edeebebf3a9f898157c683cd0d | |
parent | a8f5625a29fffa4bd0bcb01040044ad885a7378f (diff) | |
download | ubntmfi-50139f4f0a5c97102c360493a4622679209cb1e4.tar.bz2 ubntmfi-50139f4f0a5c97102c360493a4622679209cb1e4.tar.xz ubntmfi-50139f4f0a5c97102c360493a4622679209cb1e4.zip |
Fix formatting
-rw-r--r-- | inform_protocol.md | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/inform_protocol.md b/inform_protocol.md index f06ddb3..f6f8a8b 100644 --- a/inform_protocol.md +++ b/inform_protocol.md | |||
@@ -19,20 +19,22 @@ continues until the controller sends the next noop response. Responses never | |||
19 | appear to contain multiple commands. | 19 | appear to contain multiple commands. |
20 | 20 | ||
21 | ## Raw Packet Structure | 21 | ## Raw Packet Structure |
22 | 4 bytes magic number integer | 22 | | Size | Purpose | Data Type | |
23 | 4 bytes version integer | 23 | | -------- | --------------------- | --------- | |
24 | 6 bytes hwaddr string | 24 | | 4 bytes | magic number | integer | |
25 | 2 bytes flags short | 25 | | 4 bytes | version | integer | |
26 | 16 bytes initialization vector string | 26 | | 6 bytes | hwaddr | string | |
27 | 4 bytes data version integer | 27 | | 2 bytes | flags | short | |
28 | 4 bytes data length integer | 28 | | 16 bytes | initialization vector | string | |
29 | n bytes AES encrypted payload string | 29 | | 4 bytes | data version | integer | |
30 | | 4 bytes | data length | integer | | ||
31 | | n bytes | AES encrypted payload | string | | ||
30 | 32 | ||
31 | ## Raw Packet Constraints | 33 | ## Raw Packet Constraints |
32 | magic must == 1414414933 | 34 | * magic must == `1414414933` (TNBU) |
33 | data version must < 1 | 35 | * data version must < `1` |
34 | flags & 0x1 != 0 means encrypted | 36 | * `flags & 0x1 != 0` means encrypted |
35 | flags & 0x2 != 0 means compressed | 37 | * `flags & 0x2 != 0` means compressed |
36 | 38 | ||
37 | ## Payload Types | 39 | ## Payload Types |
38 | The payload is AES encrypted in CBC mode using PKCS5 padding. They key is the | 40 | The payload is AES encrypted in CBC mode using PKCS5 padding. They key is the |
@@ -52,7 +54,7 @@ and those going out of the controller. | |||
52 | 54 | ||
53 | ## Output Payloads | 55 | ## Output Payloads |
54 | Output payloads are those that originate from the controller and are bound for | 56 | Output payloads are those that originate from the controller and are bound for |
55 | the device. These always appear to contain a _type field. I have observed the | 57 | the device. These always appear to contain a \_type field. I have observed the |
56 | following output payloads. | 58 | following output payloads. |
57 | 59 | ||
58 | _type: firmware upgrade (upgrade) | 60 | _type: firmware upgrade (upgrade) |