- 27 Nov, 2018 1 commit
-
-
Rami Jung authored
in order to improve readability and reduce complexity, network_event_thread uses following subfuncions - setting UDP/TCP sockets - receiving UDP/TCP messages Change-Id: Idd4642ca9d83944e008a130b336378b7a6f38c36 Signed-off-by:
Rami Jung <rami.jung@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27529Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 26 Nov, 2018 1 commit
-
-
Sören Tempel authored
oc_connectivity_get_endpoints might return NULL. Additionally, the dst interface_index and the endpoint interface_index might never match. Meaning: The end of the linked list could be reached, if that happens dst is NULL and the current code would perform a null pointer dereference in the next loop iteration potentially causing a segfault. This was discovered by sending a CoAP GET request to the example server with libcoap's coap-client utility: $ coap-client coap://localhost/oic/res Change-Id: I4928248dd8c04fa6117edcace30688a256550463 Signed-off-by:
Sören Tempel <tempel@uni-bremen.de> Reviewed-on: https://gerrit.iotivity.org/gerrit/27541Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 13 Sep, 2018 1 commit
-
-
Inho Oh authored
This patch add missing 'static' to internal functions. Change-Id: I54ac720ef44a378bfcf775ead74de452138875f0 Signed-off-by:
Inho Oh <webispy@gmail.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26855Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 13 Aug, 2018 2 commits
-
-
Jaehong Jo authored
When we get IPv6 address using inet_ntop, there are not include [(prefix) and ](suffix). So added them when we get IPv6 address. Change-Id: Ia8bf48665627e1163bf17cf77e5f9734d9149994 Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26743Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
George Nash authored
The`size_t` type is used to represent the size of an object. It is defined as the return type of the sizeof operator. As an implication size_t is used for holding an array index. Many of the functions that would naturally return `size_t` also return -1 when an error has occured. To hold the error these functions still return int or long. Being consistant with the usage of `size_t` helps reduce the amount of casting when compiling for systems that are not 32-bit. This is a first pass through the code to identify locations that `int` or `long` was used when `size_t` probably should have been used. This is not an exastive update. Change-Id: I040f4c00cb5b3fd97810381d2f0a3e7ab82213ad Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26619Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 17 Jul, 2018 1 commit
-
-
Jaehong Jo authored
getnameinfo APIs returns domain sometimes. So changed to using inet_ntop for get IP address. Change-Id: Ic94162da7565996e03db2cabc858a8325a42b8dd Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26347Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 06 Jul, 2018 1 commit
-
-
Jaehyun Cho authored
1. some variable using unsigned value and other variable using signed and set it to unsigned value vice versa. When signed variable is set to unsigned one, add type casting before set. 2. bitwise operation is covered to parentheses when it need to check 'not' operation. Change-Id: I9faec58eef5380f6a64ab5719d1c049d869b74d9 Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26117Reviewed-by:
Uze Choi <uzchoi@samsung.com> Reviewed-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-by:
Rami Jung <rami.jung@samsung.com> Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 26 Jun, 2018 1 commit
-
-
Jaehong Jo authored
int oc_dns_lookup(const char *, oc_string_t *, enum transport_flags) Change-Id: Ib88ae9048e7febd78cf9cb4cbd7f968402b19158 Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25147Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 13 Jun, 2018 1 commit
-
-
Kishen Maloor authored
Change-Id: I38ed9930c4d1b2a057fb04e2b9571a7a036e1166 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25793Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
- 12 Jun, 2018 1 commit
-
-
Kishen Maloor authored
This patch brings in 4 related changes: 1) Add addr_local attribute to oc_endpoint_t: This is an important change that extends the oc_endpoint_t structure to include a record of the local, receiving address of a message, in addition to the destination address. This information is vital because on multi-homed devices, or devices with network interfaces carrying multiple addresses, sendto() over UDP sockets bound to ANY_ADDR would be handled with the source address of the UDP packet set by the underlying network stack. This can lead to ambiguities in other layers that rely on remote endpoint consistency to track sessions or other resources. To counter this problem, this change modifies the receive flow to extract the destination address of an incoming packet and store it in the addr_local attribute of the endpoint. Likewise, on the send side, the address from the addr_local attribute is set explicitly as the source address of the outgoing UDP packet. The above logic has been fully implemented on the Linux and Windows ports with the aid of the sendmsg()/recvmsg() APIs that allow us to read/write anciliary data from/to the UDP packet. Ports for constrained devices can choose to employ this behavior in appropriate scenarios, though a basic case of having a single network interface would not require this handling. 2) Store interface index of the network interface that receives a UDP/TCP packet in oc_endpoint_t. The interface index is also obtained from the anciliary data in the UDP packet and stored. This information is echoed back in the outgoing UDP packet for a response. But it also serves the purpose of restricting the list of endpoints returned by the oic/res handler to a requestor. For e.g. if an oic/res request had arrived through interface x, it can be assumed that there certianly exists a route to the remote endpoint through interface x. Consequently, the oic/res handler includes ONLY addresses from interface x in its response, and exclude addresses from all other active network interfaces on its system. 3) While constructing a list of endpoints, a change now returns utmost one IPv6 address and one IPv4 address for any network interface. Further, the Linux and Windows ports now have logic to return only the highest-scope IPv6 address (if one exists) on an interface. For e.g. if an interface contains link-local and one/more Global IPv6 addresses (say one private, one ISP-assigned), it will pick the highest-scoped, non-temporary (DNS eligible) address. The internal oc_connectivity_get_endpoints() API will return this pared down list of addresses, which are then reflected the oic/res response. 4) All the ports have been modified to store the list of endpoints on the machine, and not re-compute for each call to oc_connectivity_get_endpoints(). For the Linux and Windows ports, separate lists are maintained per logical device. Further, these lists are refreshed automatically upon any detected network interface change. Change-Id: I4bfa25a5c2b491d36726e3bb8bfad64d81effb04 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25773Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
- 08 Jun, 2018 1 commit
-
-
Kishen Maloor authored
This change makes the internal logic to propagate network interface up/down and session connected/disconnected events a compile-time option. Both these features require ports to implement the logic for obtaining network interface events from the network stack, as well as the add/remove/handle interfaces for recording and invoking callbacks to the application. By making it optional, ports/apps that don’t require these events can choose to exclude the internal framework logic altogether. As a result of this change, apps must now #define OC_NETWORK_MONITOR for enabling network interface events, and OC_SESSION_EVENTS for session connect/disconnect events in config.h. Note: In the case of session events, the internal logic that removes observers and other resources at the close of a TCP/TLS session is still included and executed irrespective. The #define OC_SESSION_EVENTS is required only to invoke the handle_* interfaces for processing application callbacks to notify events. Change-Id: I6ca3287c5d66c2fb821f73a2999c259ac8ac5749 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25747Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
- 01 Jun, 2018 1 commit
-
-
Jaehyun Cho authored
To see decrpted coap payload, move log location for send/receive routine. Change-Id: Ia25fc9ac868587a30eba591bd98eb921a955b44b Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25595Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 30 May, 2018 2 commits
-
-
Jaehong Jo authored
Change-Id: I61069556147182ed9f3b8095a06990b7126d104c Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25541Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Jaehyun Cho authored
In some RTOS can't verify send always success, so somtimes send or tcp connect can be failed. In case of secure transfer, if message send failure, tls will handle error case using return value. If RTOS fail to connect TCP in case of handshake, then ssl context need to delete. So I changed oc_send_buffer() return their result about send. Change-Id: Ie8b6815c65180cb8131da6482da58d91d329726c Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25453Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 16 May, 2018 1 commit
-
-
Oleksandr Dmytrenko authored
fix crash on tun interface Change-Id: I4cb55bc229b4fa0977b5666062decf1d75fb2f14 Signed-off-by:
Oleksandr Dmytrenko <o.dmytrenko@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25239Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Uze Choi <uzchoi@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 10 May, 2018 1 commit
-
-
Kishen Maloor authored
Change-Id: Ifce87bd11aef2a3baf044836b5ebf565e1b46292 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25103Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
- 07 May, 2018 1 commit
-
-
Jaehyun Cho authored
IP interface list. - To manage IP network interface up/down events, available interfaces will be included in the list. Network interface event callback. - After netlink socket receive new or delete interface event, interface state changed callback is called if application set regarding callback. Callback List. - network interface & session event handler can be added multiple callback by using oc_list. Move endpoint structure location. - oc_session_event use oc_endpoint_t. And also oc_connectivity need oc_session_event header. To reduce circular dependency, oc_endpoint_t structure location is changed in oc_endpoint header. Change-Id: I2a58aa98613da8dac454304c52124393403f8a20 Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/25017Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 30 Apr, 2018 1 commit
-
-
Jaehyun Cho authored
Change-Id: I46d7c8391441cd89442a40beac7f1cb84d58e530 Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/24851Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 27 Apr, 2018 1 commit
-
-
Kishen Maloor authored
* Refactored few internal functions and modified the TCP session cleanup procedure. * Dispatch a CONNECTED event for plain TCP sessions and a DISCONNECTED event for all other cases when the session object is freed. * Added a per logical device mutex to synchronize between send/receive/end_session calls to avoid a race between the stack’s worker thread and the network thread. * Implemented oc_connectivity_end_session() interface in the IP adapter. Change-Id: Icc875bc63d3ffb90e6ab971835e77f41798dbd32 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/24947
-
- 26 Apr, 2018 1 commit
-
-
Kishen Maloor authored
This patch adds a mechanism for cleaning up any internal session state upon termination of TCP, TLS, or DTLS sessions. Two new APIs: oc_session_start_event() and oc_session_end_event() may be invoked from the (separate) network thread in the connectivity implementation, upon initiating new sessions or detecting a session close via the network stack. This applies only to TCP and TLS sessions. This will not apply to DTLS sessions which receive no such indication via the network stack, but internal state is nonetheless cleared upon receipt of an explicit DTLS CLOSE_NOTIFY message. In addition, applications will now have the ability to (optionally) set a callback to be invoked upon session establishment and disconnections, supplying the specific oc_endpoint_t of the remote device along with an OC_SESSION_CONNECTED/OC_SESSION_DISCONNECTED status. This applies to DTLS, TLS and plain TCP sessions. Lastly, clients will have an oc_close_session() API they can call to tear down any open DTLS, TLS and TCP sessions. Change-Id: Icee7f3d6006d779b173ffaa9dd508dbbbdc327d2 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/24943
-
- 13 Apr, 2018 1 commit
-
-
Andreas Zisowsky authored
- Added shutdown pipe to leave network thread as pthread_cancel does not free resources and is not available on Android. - Removed \n from TCP logs due to recent changes in the logging no longer requiring it. Signed-off-by:
Andreas Zisowsky <zisowsky@lynxtechnology.com> Change-Id: I6924211b5defbf770b4be72fc2816256fc26f399 Reviewed-on: https://gerrit.iotivity.org/gerrit/24623Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 09 Apr, 2018 2 commits
-
-
Jaehyun Cho authored
Change-Id: Iccaed9f70cdeaeb0f6fb680a920ad4b5e59a822f Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/24545Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Jaehong Jo authored
And add below define #define OC_LOGipaddr(endpoint) #define OC_LOGbytes(count, bytes) Change-Id: Ica1237688512383a6370bb4b9881cb26bc707a54 Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/24525Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 15 Mar, 2018 1 commit
-
-
Kishen Maloor authored
Cleared build warnings reported by GCC 7.2.0 and addressed all errors reported following Coverity’s static code analysis with several minor code changes. Change-Id: I6798b49ea5579b7ac2a9ff2b966e33ec213e6921 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/24393
-
- 02 Feb, 2018 1 commit
-
-
Kishen Maloor authored
Change-Id: I96cea70030c164397e42e6e793e2b8cfdf09b485 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/24065
-
- 15 Dec, 2017 1 commit
-
-
Kishen Maloor authored
* Set scope_id into outgoing message for each interface in oc_send_discovery_request(). * Iterate through all interfaces to add IPv6 multicast membership inside add_mcast_sock_to_ipv6_multicast_group(). Change-Id: Ie0d754fe20e8c7b0faee69e83f0878cc4ed9529a Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/23769
-
- 08 Oct, 2017 1 commit
-
-
Andreas Zisowsky authored
The commit changes that for unicasts the stack returns an error response for unsupported queries such as unknown resource types. For multicast queries the requests are still silently ignored. Suppress piid for OIC 1.1 requests. Change-Id: I11ce4617c1360b77dd132206ad07c454b590c1ac Signed-off-by:
Andreas Zisowsky <zisowsky@lynxtechnology.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/22643Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 22 Sep, 2017 1 commit
-
-
Andreas Zisowsky authored
The change continues reading the netlink socket on Linux until the kernel returns either an error or the DONE message. Signed-off-by:
Andreas Zisowsky <zisowsky@lynxtechnology.com> Change-Id: I0078dff26f821b0b324214f2cca19f1c0e4e38b8 Reviewed-on: https://gerrit.iotivity.org/gerrit/22573Reviewed-by:
Reinhard Baier <baier@lynxtechnology.com> Tested-by:
Reinhard Baier <baier@lynxtechnology.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/22575Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 18 Sep, 2017 1 commit
-
-
Andreas Zisowsky authored
Change-Id: Icde13e09e9cdd9e7ae8de7bdf0d4ab263ea73104 Signed-off-by:
Andreas Zisowsky <zisowsky@lynxtechnology.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/22489Reviewed-by:
Reinhard Baier <baier@lynxtechnology.com> Tested-by:
Reinhard Baier <baier@lynxtechnology.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/22505Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 26 Jul, 2017 1 commit
-
-
Kishen Maloor authored
This commit brings in many significant changes to the handling and processing of discovery requests and responses, and also aligns the resource architecture and core representations to the OCF 1.0 specification. It adds support for OCF 1.0 endpoints to interpret the the coap and coaps schemes over IPv4/v6 with platform neutral functions to convert IPv4/v6 addresses to/from strings and the ability to construct and maintain lists of endpoint descriptions for a remote entity by allocating from a pool of endpoint structures in both the server/client roles. In keeping with OCF resource model concepts of a platform with logical devices, this commit adds support for the definition of multiple virtual servers with an application that reside on a single platform. Virtual servers are bound to different ports and behave as independent entities, separately handling requests. All virtual servers expose the required set of core OCF resources (oic/res, oic/d, oic/con, security resources, etc.), but share a single oic/p resource corresponding to the underlying platform. Virtual servers would each have to be independently onboarded and provisioned in the security context in order for their resources to be accessed. Application resources are instantiated and bound to a specific logical device in the application, and resource handlers are made aware of their hosting device. This design is usually employed in a bridging scenario with OCF. The new multi_device_server/multi_device_client samples for Linux illustrate these concepts in action. Logical devices are defined using the oc_add_device() API and are identified by their zero based index in the order of oc_add_device() calls. Internal APIs now take the device index as the parameter. The interfaces to initialize and teardown connectivity also take device index as a parameter. The expectation is that implementations that wish to support multiple logical devices would allocate the required set of resources to hold multiple sets of handles, port numbers, addresses etc., one set for each logical device. A new interface to obtain the set of endpoints hosting a logical device must be realized in connectivity implementations, and is invoked in the discovery resource handler to populate the "eps" parameter. The Linux IP adapter incorporates full support for defining multiple logical devices by implementing the new interfaces, where each logical device maintains secured/unsecured ports over IPv6, and optionally over IPv4. The IP adapters for constrained OSes have been updated to return the list of endpoints, but continue to handle only a single logical device, as would be expected for constrained platforms. The build with security is NOT functional at the moment and has yet to be updated for OCF 1.0 security. However, the above changes were successfully tested for interoperability with IoTivity 1.3 (master) using the OCF 1.0 scheme and by running the simpleclient/simpleserver samples. Additional notes: -Clients are now upon successful discovery handed a linked list of oc_endpoint_t structures that they may use to reach a server. This eliminates the oc_server_handle_t structure and all client APIs instead accept an oc_endpoin_t handle. These oc_endpoint_t structures are allocated from a pool, and the oc_free_server_endpoints() API may be used to free all server endpoints back to the poool when the client has no more interest to contact the server. -The handler for collections has been updated to include the “eps” property containing the list of endpoints to reach a referenced resource in a link. -The oic/d handler now returns the pid property containing a UUID. -The default OC_MAX_APP_DATA_SIZE for dynamic builds has been raised to 8192 bytes. -oc_connectivity_init() for each logical device is invoked through every oc_add_device() call. -Elimination of duplicate requests now happens by checking both the message id and logical device index. -Interfaces into the security implementation have been updated to mesh with the above changes, but the implementation itself is NOT currently functional. Change-Id: Iccf9e174b7d41d81eba89c010b8dbef9b090fc4e Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/21607
-
- 20 Mar, 2017 1 commit
-
-
Kishen Maloor authored
* This feature allows IoTivity-Constrained to dynamically allocate memory from the heap on rich environments that provide a full C library and an allocator (Linux, Windows, iOS, etc.) * When enabled, the core framework internally invokes functions from the C standard library (malloc(), free(), etc.) while ignoring all constraints that were set in config.h. * This is an optional feature, and is enabled by setting #define OC_DYNAMIC_ALLOCATION in config.h. In addition, port/linux/Makefile now takes a new command-line option DYNAMIC=1 to include it. When OC_DYNAMIC_ALLOCATION is not set, the resulting build statically allocates all memory under the set constraints, as before. * This feature is completely transparent to both IoTivity-Constrained applications and port implementations. However, the application now has the added ability to set two parameters via new APIs at runtime: prescriptive MTU size, and maximum application data size. The MTU size is used to compute a maximum supported block size (16 - 1024 bytes), and the application data size is used to allocate internal buffers of that size to hold the entire application payload for block-wise transfers, separate responses and resource observations. * Modified server_block_linux and client_block_linux to demonstrate the use of these APIs: oc_set_mtu_size() and oc_set_max_app_data_size(). * Cleaned up some parts of the internal flow to fix up previously hidden issues (when all memory was statically allocated). Change-Id: I50fba434ea2073371b27c260569ed147d22e2804 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17877Reviewed-by:
Flavio Ceolin <flavio.ceolin@intel.com> Tested-by:
Flavio Ceolin <flavio.ceolin@intel.com>
-
- 14 Mar, 2017 2 commits
-
-
Reinhard Baier authored
Change-Id: Ib1d819ef00ccd0ceb830c6f502f57aa2495cc7c4 Signed-off-by:
Reinhard Baier <baier@lynxtechnology.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17911 (cherry picked from commit 37e008a8) Reviewed-on: https://gerrit.iotivity.org/gerrit/17913Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Reinhard Baier authored
Change-Id: I0d05a9228fc44b5da65857a8fc7a477c6c3db63b Signed-off-by:
Reinhard Baier <baier@lynxtechnology.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17903 (cherry picked from commit 41f255a3) Reviewed-on: https://gerrit.iotivity.org/gerrit/17905Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 07 Mar, 2017 1 commit
-
-
Flavio Ceolin authored
Change-Id: Ifd407e4c7a99aeb2c76bc0642255e85d73c20bed Signed-off-by:
Flavio Ceolin <flavio.ceolin@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17747Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 01 Mar, 2017 2 commits
-
-
Flavio Ceolin authored
Create three basic domains ("ERROR", "WARNING" and "DEBUG") for debugging. Also, with the domain are printed the file, line and function. Change-Id: I3f0bc2329ec66456b1aeb1b215147702a0b3e7ec Signed-off-by:
Flavio Ceolin <flavio.ceolin@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17347Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Flavio Ceolin authored
oc_send_buffer() was blockin in a select before calling sendto(), it's better let the sendto() blocking and remove the select(). Besides that, the select was being called only for the first sendto() call. Change-Id: Ib9e5173a770df9d8315e8393e735e3dac5a6cc25 Signed-off-by:
Flavio Ceolin <flavio.ceolin@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17585Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 27 Feb, 2017 1 commit
-
-
Kishen Maloor authored
* On the server-side, enable OCF discovery over the IPv6 realm-local and site-local scopes, in addition to the link-local scope. * Declare IPv6/v4 multicast addresses in binary form instead of a string. This eliminates the need to use inet_pton() to do the translation. * Add error check from sendto() in oc_send_buffer(). * Close IPv4 sockets in oc_connectivity_shutdown(). Change-Id: I6d1cb7dae4494aa3cef7251f6000ea12346d0a74 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17357
-
- 19 Feb, 2017 1 commit
-
-
Flavio Ceolin authored
Join the network thread to allows it does its cleanup before the process finishes. It avoids resources leak. Change-Id: I24747c01169042653c8369612ec3dd6f07038e72 Signed-off-by:
Flavio Ceolin <flavio.ceolin@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17353Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 17 Feb, 2017 1 commit
-
-
Flavio Ceolin authored
In order to enable the IPv4 during the build the IPV4 should be given. e.g: make -C port/linux IPV4=1 So far, only Linux port supports IPv4. Change-Id: I14bbdd16b59b224434cfdbab4073715739076182 Signed-off-by:
Flavio Ceolin <flavio.ceolin@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/17231Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 27 Jan, 2017 1 commit
-
-
Kishen Maloor authored
* Added new transport flag for IPV4 (and renamed IP to IPV6). * Renamed transport flag MULTICAST to DISCOVERY. * Removed transport flag IPSP (since it would simply talk through an IP interface). * Renamed oc_send_multicast_message() to oc_send_discovery_request(). This is more general and aligned to its purpose. * Updated all connectivity implementations and other impacted modules. Change-Id: Ic5c659bf5e0aeb27327a6bf44203de386d388928 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/16849
-