-
Notifications
You must be signed in to change notification settings - Fork 113
MQTTv5 Implementation #316
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
Open
adituc
wants to merge
371
commits into
FreeRTOS:main
Choose a base branch
from
adituc:mqtt-v5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
371 commits
Select commit
Hold shift + click to select a range
681d7b3
Modifiying disconnect API
adituc d843640
disconnect api changes
adituc 7f4e41b
adding comments
adituc c110e31
removing v3 flags
adituc 6897ce4
removing v3 code
adituc 4781f96
adding comments
adituc 9a3c4df
removing rc
adituc 682caac
Add optional will props builder in Connect
adituc 31472df
Remove v3 code
adituc af9a933
Add minor updates to code
DakshitBabbar c1f5b84
Move MQTTV5_GetAckPacketSize to serializer.c
adituc 8c1833e
Delete v3 code, modify sendConnectWithoutCopy
adituc 1fc680a
Modifying sendPublishWithoutCopy
adituc 0c5ca3f
Modify Disconnect to allow for NULL props
adituc da1173b
Change sendSubscribeWithoutCopy
adituc cd938c0
Change MQTTV5_GetAckPacketSize
adituc 4fa21fa
Change MQTTV5_GetAckPacketSize
adituc d2480cf
Change reason code
adituc 76577b1
Shift API calls to serializer.c
adituc af99d3a
Add minor updates to code
DakshitBabbar e79401c
Add checks for optional properties API
adituc b9d41b2
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc 522c738
Set connectProps as an object in the MQTTContext
adituc e56e8f2
Move MQTTV5_InitConnect to coremqtt.c
adituc e9ce358
Removing remainingLengthEncodedSize from coremqtt.c
adituc 7979d7e
Put sendMessageVector() for each topic filter
adituc a2089bc
inlcuding core_mqtt.h in core_mqtt_serializer.c
adituc dd7f51e
Add minor updates to the code.
DakshitBabbar 2bf0587
Reverting shifting API to serializer
adituc 23f4008
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc 28b1228
Setting util properties in serializer.h
adituc c583293
Revert changes
adituc 6ac9082
Remove serialize properties code
adituc 8e9ce20
Allow users to set ackPropsBuffer to NULL in MQTT_Init
adituc 0c7f347
Remove authInfoSize() from serializer
adituc 22f408e
add util functions to serializer.h
adituc e70c0d4
Removing v3 from function names
adituc 0a8e2a4
Add checks in subscribe
adituc 7d76b43
add checks for publish
adituc b70cfa6
Change function name
adituc 270501b
Change function names
adituc d437b6a
Minor updates
adituc 84ad685
Test for outgoing acks
adituc 13863a2
Add tests in utest and serializer_utest
adituc 51b3d07
test for GetNextProp APIs
adituc a1a38f8
Modify tests for new init
adituc 908adbb
Add tests
adituc 253000a
Test for GetNextProp APIs
adituc 7311e6b
final tests for optional properties
adituc e795f66
Revert test files to serializer_utest
adituc 9e587de
Revert changes
adituc 577ae88
Add unit test
adituc 7a592e7
Add unit tests
adituc 27bf642
Add unit tests
adituc 0664d17
add unit tests
adituc b2200ec
Add tests
adituc 7b01723
Add unit tests
adituc 1bce250
Add tests
adituc f12bc36
Add tests
adituc fe6de29
Add tests
adituc 8c55079
add utils file
adituc 05d6b77
Minor updates to the code
DakshitBabbar 55dfff0
Add reason code changes for publish acks
adituc 55fa9d7
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc c84aab8
Minor changes
adituc a1fcc3d
minor fix
adituc 8a1de56
minor fix
adituc 6143c17
Minor fix
adituc c926f4b
Minor change
adituc c9e56e5
add checks to the APIs
adituc ebf74b8
incoming ack change
adituc ec5dee0
Add minor updates to code
DakshitBabbar b081bab
minor fix
adituc c9e7025
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc 818e473
fix disconnect
adituc 46425ab
Add checks to the getProps API
adituc ace68d8
Minor fix
adituc ef9b5c6
add tests
adituc f2eccc0
add unit tests
adituc cf7300c
Add u-test
adituc e7fa3f0
Add u-tests
adituc 4605138
Add unit tests
adituc e44eed0
Resolve PR comments
adituc 0c14625
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc a2269ae
Address PR comments
adituc e7ec509
Address PR comments
adituc 369a3b9
resolve PR comments
adituc cdb1ca9
Resolve PR comments
adituc 259032b
Refactor code
adituc 565cc64
Resolve PR comments
adituc d6aea0c
merge upstream mainline
adituc 8f4144a
Minor fix
adituc fadb982
Minor fix
adituc 547f6e0
Minor fix
adituc 0f978f2
Update the ubuntu version for uncrustify formating CI checks
DakshitBabbar e8fed9c
refactor code for coverity
adituc fb5738d
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc 186c09c
tests
adituc d52bddf
minor fix
adituc 59fa9d2
reason code change
adituc f52e146
reduce complexity
adituc b702c47
minor fix
adituc c53c176
add decodeAndDiscard_utf8
adituc 5a8f58c
Minor change to run formatting CI
DakshitBabbar e05daf8
Add unit tests + formatting changes
adituc a010e8e
Adding tests
adituc 59f447a
Add documentation
adituc d7bfe3a
Add documentation
adituc 005bfcf
Fix warning
adituc bfca9af
Change test file name
adituc db6274f
add documentation
adituc fb59991
Merge branch 'main' into mqtt-v5
adituc a04b8f2
Memory stats changes
adituc 8daf2f5
fix spell-check errors
adituc b810c35
fix complexity errors
adituc 8de1cb9
Reduce complexity
adituc b2aede0
fix memory stats
adituc bf56497
minor fix
adituc c96f782
change complexity threshold to 17
adituc 623edb1
Add extra APIs
adituc 414485c
Trigger CI Checks
DakshitBabbar a14de1d
Fix Formatting and Memory stats
DakshitBabbar 248c9ca
Fix memory stats
DakshitBabbar c67833a
Merge branch 'main' into mqtt-v5
DakshitBabbar 148535e
Fix minor coverity violations
DakshitBabbar 7bc031a
Modify CBMC proofs for Init, Connect, DeserializeAck. DeserialisePublish
DakshitBabbar 6d79968
Add MQTT_Serialize_* APIs
adituc db3d0d4
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc 188ab33
Update Disconnect API CBMC proof
DakshitBabbar 1eab9fe
modify property validation
adituc bd4e5bf
Resolve Conflicts Manually
DakshitBabbar 44e2f62
Remove formatting bot workflow (#320)
archigup 7205ba2
Fix minor coverity violations
DakshitBabbar 64adad9
modify property validation
adituc 47774d9
Update CI to run only 1 proof for testing
DakshitBabbar 81561cd
Update the CI to run cbmc without PR as well
DakshitBabbar 541684b
Update code for new API names
DakshitBabbar 58ade31
add input checking to user facing functions
adituc 4b4e47b
add checks for connack
adituc 8a8b411
add validation for packets
adituc 720ae16
Cleanup the code for unused macros
DakshitBabbar a2de1ff
Code cleanup and minor fix
adituc d5f9f74
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc cc8f2aa
fix warnings
adituc 3440939
Move core_mqtt_utils.c from MQTT_SOURCES to MQTT_SERIALIZER_SOURCES
adituc 4897703
Add UnsubscribeWithoutCopy and resolve PR comments
adituc 5377a02
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc e9242b7
Combine all incoming acks under 1 function, MQTT_DeserializeAck
adituc 786d9df
Add validation to Outgoing Publish Ack Properties
adituc 6b9793d
Fix Formatting via uncrustify
adituc 2d9c951
Update Migration Guide for coreMQTT v3.0.0 and address PR comments
adituc 69be6fb
Fix coverity warnings
adituc 4e37f56
Modify subscription options in MQTT_SerializeSubscribe
adituc 994d11f
Minor fix
adituc 36c98b9
Fix coverity warnings
adituc 51a9658
Revert MQTT_SerializeSubscribe change
adituc 71893b9
Merge branch 'mqtt-v5' of https://github.com/adituc/coreMQTT into mqt…
adituc baaec2b
Merge branch into mqtt-v5
adituc 43b1f64
Fix memory stats, update Migration guide and fix spell check
adituc ced9b45
Increase branch coverage
adituc 3ff2048
Increase branch coverage
adituc 733ab44
Remove redundant test and add MISRA.md
adituc b6b5acb
Remove unused fields from the context and MQTTPublishInfo
adituc 89119fb
Move MQTT_PropertyBuilder_Init to serializer
adituc 1cbf594
Add new CI check to test cbmc
DakshitBabbar 80e9af0
Add invalid reason code and adjust tests
adituc 46e728e
Update proofs for deserialize publish and publish properties
DakshitBabbar ca7427a
Fix memory stats and doxygen error
adituc 6949faa
Fix formatting via uncrustify
adituc b9f3a12
Fix minor unit test warning
adituc 78084b6
Fix formatting workflow failure
adituc 8e67694
Merge branch 'mqtt-v5' into cbmc-mqttv5
DakshitBabbar 2e37b52
Add CBMC branch for CI checks
DakshitBabbar 892a894
Trigger CI Checks
DakshitBabbar 27d1a73
Fix build errors after merge
DakshitBabbar 4f9652a
Fix all CBMC build failures
DakshitBabbar c5cf88d
Fix Connect Proof
DakshitBabbar d95a8f2
Modify CI to run particular CBMC proofs
DakshitBabbar 86d14b0
Update Connect proof - test
DakshitBabbar 91b8009
Update proofs for processloop, deserializeack and decodeack
DakshitBabbar 0bfd031
Add subset of proofs to CI
DakshitBabbar 0f70b17
Add proofs for processloop and publish
DakshitBabbar 433ba17
Remove MQTT_SerializeConnectfrom CBMC CI run
DakshitBabbar 8ae9bbe
Fix tests and documentation after cbmc updates
adituc 3faa459
Add MQTT_SerializeConnect to the CI check - test
DakshitBabbar a2aa462
Add MQTT_SerializeDisconnect in CI check - test
DakshitBabbar 6ecd97e
Merge branch 'cbmc-mqttv5' of https://github.com/DakshitBabbar/coreMQ…
adituc 1e63751
Fix formatting via patch
adituc fd72621
Update proofs for serializer APIs
DakshitBabbar 4a7767d
Reset CI checks workflow back
DakshitBabbar dadfa8e
Include the default value of macros
DakshitBabbar da70ebc
Update the CI to have only serialize connect and disconnect APIs
DakshitBabbar 40f264f
Add serialize publish and disconnect in CI checks - test
DakshitBabbar 1f5f44b
Update the serialise publish cbmc proof
DakshitBabbar f8c1b77
Add serialize subscribe and unsubscribe to ci - test
DakshitBabbar 35506ba
Exclude serialize connect from the CI - test
DakshitBabbar 9282314
Update CI workflow file
DakshitBabbar 7b359c4
Add new proof fot MQTT_DeserializeDisconnect
DakshitBabbar c8d2713
Add CBMC proofs for the PropGet APIs
DakshitBabbar 6f0e992
Update serializeconnect proof - test
DakshitBabbar 8bdf772
Stub MQTT_SerializeConnectFixedHeader
DakshitBabbar 7ab33e8
Update MQTT_SerializeConnect for testing
DakshitBabbar 0b58ff7
Limit the size of connect and will properties
DakshitBabbar f648469
Reset CI to run all proofs
DakshitBabbar 67b90c4
Fix unit tests
adituc 45b3889
Fix doxygen error, spellcheck
adituc aa9cc3b
Fix formatting via patch
adituc d4945a1
Increase branch coverage to 100% and discard unnecessary macros from …
adituc ca8e699
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc 4319e43
Fix test_ResendUnackedPublishesWithNotConnected and spellcheck
adituc a0fa457
Fix stale comments and modify event callback
adituc b3fe686
Fix unit test warnings
adituc c59e28a
Resolve merge conflicts
adituc 614927c
Fix CI Checks
adituc 088c576
Fix formatting via patch
adituc 8e30adb
Fix formatting via patch
adituc e9fc7b0
Merge branch 'main' into mqtt-v5
adituc 0a907f1
Fix unit test warnings and modify validatePublishAckReasonCodes
adituc 1b95d5a
Fix CI Check Errors
adituc 2836c15
Fix unit test warnings
adituc 1b07191
Update doxygen comments
adituc 4762aea
Changed the function signature of MQTT_DeserializeAck and fixed MQTT_…
adituc c0c5eb7
Fix formatting via patch
adituc dc08456
Fix an instance of MQTT_PropertyBuilder_Init to MQTTPropertyBuilder_Init
adituc cadb6f5
Rectify CBMC proofs
DakshitBabbar 59dea54
Minor updates for passing CBMC
DakshitBabbar 32b08c5
Resolve PR comments
adituc d4befba
Resolve PR comments
adituc 0edda48
Resolve PR Comments
adituc 71d23c1
Minor change to decodeSubackPropertyLengt()
adituc c1bb2e6
Update eventcallback stub signature for cbmc proofs
DakshitBabbar 2b90b3c
Fix Documentation for functions
adituc 98ebcf0
Merge branch 'mqtt-v5' of https://github.com/blipbloping/coreMQTT int…
adituc db78089
Minor updates to fix CBMC proofs.
DakshitBabbar c8f743e
Update CBMC proof readme and unwanted code
DakshitBabbar 6e68afe
Fix code to pass CI Checks
adituc 933dbe7
Fix formatting
adituc 3796c32
Change parameter names of pointers to start with p*
adituc 1c5a1da
Fix formatting and memory checks
adituc dd899e1
Fix coverity errors
DakshitBabbar 52e4720
Fix unit test warning
adituc bcf69a8
Fix formatting check and doxygen check
adituc fc06bff
Update migration guide for formating fixes
DakshitBabbar 88fe883
Fix Migration Guide formatting
adituc 79e4cb3
Update doxygen documentation
DakshitBabbar 26f88c4
Add table of contents to migration guide
DakshitBabbar 2f53ce3
Update the doxyfile to remove warnings
DakshitBabbar 595ba80
Fix formating and spell checks
DakshitBabbar f00e888
Clean up cbmc directories
DakshitBabbar 95d1c4b
Add documentation changes
DakshitBabbar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# CMake generated Testfile for | ||
# Source directory: /home/ubuntu/coreMQTT/test | ||
# Build directory: /home/ubuntu/coreMQTT | ||
# | ||
# This file includes the relevant testing commands required for | ||
# testing this directory and lists subdirectories to be tested as well. | ||
subdirs("unit-test") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why did our complexity go up so much?
Uh oh!
There was an error while loading. Please reload this page.
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.
The complexity increased mainly due to functions like
deserializeConnackProperties
, which now has a complexity of 17. This function handles parsing of all the possible properties in a CONNACK packet (about 17 different properties). I considered splitting the logic into smaller functions, but since all of it is part of a single, cohesive task (parsing the CONNACK properties), breaking it up would have made the flow harder to follow. So we decided to increase the complexity threshold.