summaryrefslogtreecommitdiff
path: root/shared-module/network/__init__.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-module/network/__init__.c')
-rw-r--r--shared-module/network/__init__.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared-module/network/__init__.c b/shared-module/network/__init__.c
index bf33fef7a..96648b260 100644
--- a/shared-module/network/__init__.c
+++ b/shared-module/network/__init__.c
@@ -99,3 +99,7 @@ void network_module_create_random_mac_address(uint8_t *mac) {
mac[4] = (uint8_t)(rb2 >> 8);
mac[5] = (uint8_t)(rb2);
}
+
+uint16_t network_module_create_random_source_tcp_port(void) {
+ return 0xc000 | shared_modules_random_getrandbits(14);
+}