summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/examples/iotivity_simpleserver/mkfsdata.pl32
-rw-r--r--apps/shell/tash_init.c33
-rw-r--r--external/iotjs/src/js/buffer.js21
-rw-r--r--external/iotjs/src/js/dgram.js20
-rw-r--r--external/webclient/webclient.c11
-rw-r--r--external/webserver/http_client.c6
-rw-r--r--framework/include/st_things/st_things.h6
-rw-r--r--framework/src/arastorage/aql_lexer.c11
-rw-r--r--framework/src/arastorage/aql_parser.c21
-rw-r--r--framework/src/arastorage/lvm.c77
-rw-r--r--framework/src/arastorage/lvm.h15
-rw-r--r--framework/src/st_things/things_stack/src/common/framework/things_data_manager.c34
-rw-r--r--framework/src/wifi_manager/wifi_net.c33
-rw-r--r--os/fs/driver/mtd/ftl.c17
-rw-r--r--os/fs/procfs/fs_procfscm.c34
-rw-r--r--os/fs/procfs/fs_procfsversion.c34
-rw-r--r--os/include/arpa/inet.h13
-rw-r--r--os/include/net/lwip/netif.h4
-rw-r--r--os/include/netdb.h10
-rw-r--r--os/include/netinet/ether.h2
-rw-r--r--os/include/sys/socket.h40
-rw-r--r--os/net/lwip/COPYING33
-rw-r--r--os/pm/pm_procfs.c34
23 files changed, 489 insertions, 52 deletions
diff --git a/apps/examples/iotivity_simpleserver/mkfsdata.pl b/apps/examples/iotivity_simpleserver/mkfsdata.pl
index 274c91e6..df47d071 100644
--- a/apps/examples/iotivity_simpleserver/mkfsdata.pl
+++ b/apps/examples/iotivity_simpleserver/mkfsdata.pl
@@ -16,6 +16,38 @@
# language governing permissions and limitations under the License.
#
###########################################################################
+#
+# Extracted from uIP which has a license that is compatible with NuttX.
+# There is no authorship, copyright, or licensing information in the
+# original file. Possibly written by Adam Dunkels.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
open(OUTPUT, "> ./iotivity/apps/file_data.c");
diff --git a/apps/shell/tash_init.c b/apps/shell/tash_init.c
index e486c093..a7ddaa36 100644
--- a/apps/shell/tash_init.c
+++ b/apps/shell/tash_init.c
@@ -15,6 +15,39 @@
* language governing permissions and limitations under the License.
*
****************************************************************************/
+/****************************************************************************
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
/// @file tash_init.c
/// @brief functions to initialize TinyAra SHell (TASH)
diff --git a/external/iotjs/src/js/buffer.js b/external/iotjs/src/js/buffer.js
index 503497b3..1d481fb1 100644
--- a/external/iotjs/src/js/buffer.js
+++ b/external/iotjs/src/js/buffer.js
@@ -12,7 +12,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
var bufferBuiltin = process.binding(process.binding.buffer);
var util = require('util');
diff --git a/external/iotjs/src/js/dgram.js b/external/iotjs/src/js/dgram.js
index 8d9f0b4b..cc80cec0 100644
--- a/external/iotjs/src/js/dgram.js
+++ b/external/iotjs/src/js/dgram.js
@@ -12,6 +12,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
var EventEmitter = require('events').EventEmitter;
var util = require('util');
diff --git a/external/webclient/webclient.c b/external/webclient/webclient.c
index 40afc32b..75f8ea6e 100644
--- a/external/webclient/webclient.c
+++ b/external/webclient/webclient.c
@@ -89,6 +89,7 @@
#include "../webserver/http_string_util.h"
#include "../webserver/http_client.h"
+#include <protocols/webserver/http_err.h>
#include <protocols/webclient.h>
#if defined(CONFIG_NETUTILS_CODECS)
# if defined(CONFIG_CODECS_URLCODE)
@@ -1059,6 +1060,11 @@ retry:
&encoding, &state, &mlen,
param->response->headers,
NULL, param->response, NULL);
+
+ if (read_finish == HTTP_ERROR) {
+ ndbg("Error: Parse message Fail\n");
+ goto errout;
+ }
}
param->response->method = param->method;
@@ -1203,6 +1209,11 @@ static pthread_addr_t wget_base(void *arg)
&encoding, &state, &mlen,
param->response->headers,
NULL, param->response, NULL);
+
+ if (read_finish == HTTP_ERROR) {
+ ndbg("Error: Parse message Fail\n");
+ goto errout;
+ }
}
param->response->method = param->method;
diff --git a/external/webserver/http_client.c b/external/webserver/http_client.c
index 482aba6e..3db00696 100644
--- a/external/webserver/http_client.c
+++ b/external/webserver/http_client.c
@@ -215,7 +215,11 @@ int http_parse_message(char *buf, int buf_len, int *method, char *url,
buf[sentence_end] = '\0';
if (strlen(buf + len->sentence_start) > 0) {
/* Read parameters */
- http_separate_keyvalue(buf + len->sentence_start, key, value);
+ int result = http_separate_keyvalue(buf + len->sentence_start, key, value);
+ if (result == HTTP_ERROR) {
+ HTTP_LOGE("Error: Fail to separate keyvalue\n");
+ return HTTP_ERROR;
+ }
HTTP_LOGD("[HTTP Parameter] Key: %s / Value: %s\n", key, value);
http_keyvalue_list_add(params, key, value);
diff --git a/framework/include/st_things/st_things.h b/framework/include/st_things/st_things.h
index 581f6454..ef74e003 100644
--- a/framework/include/st_things/st_things.h
+++ b/framework/include/st_things/st_things.h
@@ -73,6 +73,7 @@ extern "C" {
*/
int st_things_initialize(const char *json_path, bool *easysetup_complete);
+//@cond
/**
* @brief Deinitializes things stack.
* Stack should have been initialized before calling this API.
@@ -85,9 +86,9 @@ int st_things_initialize(const char *json_path, bool *easysetup_complete);
* Initialize the stack by calling st_things_initialize().
* @retval #ST_THINGS_ERROR_STACK_RUNNING Stack is currently running.
* Before deinitialize, stack needs to be stopped by calling st_things_stop().
- * @since Tizen RT v1.1
*/
int st_things_deinitialize(void);
+//@endcond
/**
* @brief Callback for handling GET request.
@@ -223,6 +224,7 @@ typedef void (*st_things_pin_generated_cb) (const char *pin_data, const size_t p
*/
typedef void (*st_things_pin_display_close_cb) (void);
+//@cond
/**
* @brief Callback registration function for getting randomly generated PIN for the PIN-Based Ownership Transfer Request.
*
@@ -238,9 +240,9 @@ typedef void (*st_things_pin_display_close_cb) (void);
* @retval #ST_THINGS_ERROR_NONE Successful
* @retval #ST_THINGS_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ST_THINGS_ERROR_OPERATION_FAILED Operation failed
- * @since Tizen RT v1.1
*/
int st_things_register_pin_handling_cb(st_things_pin_generated_cb generated_cb, st_things_pin_display_close_cb close_cb);
+//@endcond
/**
* @brief Callback for getting user's input regarding mutual verification.
diff --git a/framework/src/arastorage/aql_lexer.c b/framework/src/arastorage/aql_lexer.c
index 47f4ccfe..24b9aef7 100644
--- a/framework/src/arastorage/aql_lexer.c
+++ b/framework/src/arastorage/aql_lexer.c
@@ -62,6 +62,7 @@
#include <string.h>
#include <sys/types.h>
#include "aql.h"
+#include "db_options.h"
/****************************************************************************
* Private Types
@@ -217,6 +218,11 @@ static int next_string(lexer_t *lexer, const char *s)
*lexer->token = STRING_VALUE;
lexer->input = end + 1; /* Skip the closing delimiter. */
+ /* The size of value is DB_MAX_ELEMENT_SIZE defined in db_options.h */
+ if (length >= DB_MAX_ELEMENT_SIZE) {
+ return -1;
+ }
+
memcpy(lexer->value, s, length);
(*lexer->value)[length] = '\0';
@@ -245,6 +251,11 @@ static int next_token(lexer_t *lexer, const char *s)
*lexer->token = IDENTIFIER;
+ /* The size of value is DB_MAX_ELEMENT_SIZE defined in db_options.h */
+ if (length >= DB_MAX_ELEMENT_SIZE) {
+ return -1;
+ }
+
memcpy(lexer->value, s, length);
(*lexer->value)[length] = '\0';
diff --git a/framework/src/arastorage/aql_parser.c b/framework/src/arastorage/aql_parser.c
index cf961bb8..fb979aa9 100644
--- a/framework/src/arastorage/aql_parser.c
+++ b/framework/src/arastorage/aql_parser.c
@@ -284,8 +284,9 @@ PARSER(operand)
NEXT;
switch (TOKEN) {
case IDENTIFIER:
- lvm_register_variable(p, VALUE, LVM_LONG);
- lvm_set_variable(p, VALUE);
+ if (LVM_ERROR(lvm_register_variable(p, VALUE, LVM_LONG)) || LVM_ERROR(lvm_set_variable(p, VALUE))) {
+ RETURN(SYNTAX_ERROR);
+ }
AQL_ADD_PROCESSING_ATTRIBUTE(adt, VALUE);
break;
case STRING_VALUE:
@@ -293,7 +294,9 @@ PARSER(operand)
case FLOAT_VALUE:
break;
case INTEGER_VALUE:
- lvm_set_long(p, *(long *)lexer->value);
+ if (LVM_ERROR(lvm_set_long(p, *(long *)lexer->value))) {
+ RETURN(SYNTAX_ERROR);
+ }
break;
default:
RETURN(SYNTAX_ERROR);
@@ -357,7 +360,9 @@ PARSER(expr)
default:
RETURN(SYNTAX_ERROR);
}
- lvm_set_op(p, op);
+ if (LVM_ERROR(lvm_set_op(p, op))) {
+ RETURN(SYNTAX_ERROR);
+ }
lvm_set_end(p, saved_end);
}
@@ -409,7 +414,9 @@ PARSER(comparison)
RETURN(SYNTAX_ERROR);
}
- lvm_set_relation(p, rel);
+ if (LVM_ERROR(lvm_set_relation(p, rel))) {
+ RETURN(SYNTAX_ERROR);
+ }
lvm_set_end(p, saved_end);
if (!PARSE(expr)) {
@@ -445,7 +452,9 @@ PARSER(where)
connective = TOKEN == AND ? LVM_AND : LVM_OR;
saved_end = lvm_shift_for_operator(p, saved_end);
- lvm_set_relation(p, connective);
+ if (LVM_ERROR(lvm_set_relation(p, connective))) {
+ RETURN(SYNTAX_ERROR);
+ }
lvm_set_end(p, saved_end);
NEXT;
diff --git a/framework/src/arastorage/lvm.c b/framework/src/arastorage/lvm.c
index 81f1f0fd..f98d5760 100644
--- a/framework/src/arastorage/lvm.c
+++ b/framework/src/arastorage/lvm.c
@@ -62,6 +62,7 @@
#include "aql.h"
#include "db_debug.h"
#include "lvm.h"
+#include "db_options.h"
/****************************************************************************
* Pre-processor Definitions
@@ -338,10 +339,17 @@ lvm_ip_t lvm_set_end(lvm_instance_t *p, lvm_ip_t end)
return old_end;
}
-void lvm_set_type(lvm_instance_t *p, node_type_t type)
+lvm_status_t lvm_set_type(lvm_instance_t *p, node_type_t type)
{
+ if (p->end >= DB_VM_BYTECODE_SIZE) {
+ DB_LOG_E("lvm_set_type failed because of overflow\n");
+ return STACK_OVERFLOW;
+ }
+
*(node_type_t *)(p->code + p->end) = type;
p->end += sizeof(type);
+
+ return LVM_TRUE;
}
lvm_status_t lvm_execute(lvm_instance_t *p)
@@ -370,28 +378,58 @@ lvm_status_t lvm_execute(lvm_instance_t *p)
return status;
}
-void lvm_set_op(lvm_instance_t *p, operator_t op)
+lvm_status_t lvm_set_op(lvm_instance_t *p, operator_t op)
{
- lvm_set_type(p, LVM_ARITH_OP);
+ lvm_status_t result;
+
+ result = lvm_set_type(p, LVM_ARITH_OP);
+
+ if (LVM_ERROR(result) || p->end + sizeof(op) >= DB_VM_BYTECODE_SIZE) {
+ DB_LOG_E("lvm_set_op failed because of overflow\n");
+ return STACK_OVERFLOW;
+ }
+
memcpy(&p->code[p->end], &op, sizeof(op));
p->end += sizeof(op);
+
+ return LVM_TRUE;
}
-void lvm_set_relation(lvm_instance_t *p, operator_t op)
+lvm_status_t lvm_set_relation(lvm_instance_t *p, operator_t op)
{
- lvm_set_type(p, LVM_CMP_OP);
+ lvm_status_t result;
+
+ result = lvm_set_type(p, LVM_CMP_OP);
+
+ if (LVM_ERROR(result) || p->end + sizeof(op) >= DB_VM_BYTECODE_SIZE) {
+ DB_LOG_E("lvm_set_relation failed because of overflow\n");
+ return STACK_OVERFLOW;
+ }
+
memcpy(&p->code[p->end], &op, sizeof(op));
p->end += sizeof(op);
+
+ return LVM_TRUE;
}
-void lvm_set_operand(lvm_instance_t *p, operand_t *op)
+lvm_status_t lvm_set_operand(lvm_instance_t *p, operand_t *op)
{
- lvm_set_type(p, LVM_OPERAND);
+ lvm_status_t result;
+
+ result = lvm_set_type(p, LVM_OPERAND);
+
+ if (LVM_ERROR(result) || p->end + sizeof(*op) >= DB_VM_BYTECODE_SIZE) {
+ DB_LOG_E("lvm_set_operand failed because of overflow\n");
+ return STACK_OVERFLOW;
+ }
+
memcpy(&p->code[p->end], op, sizeof(*op));
p->end += sizeof(*op);
+
+ return LVM_TRUE;
}
-void lvm_set_operand_value(lvm_instance_t *p, attribute_t *attr, unsigned char *value)
+lvm_status_t lvm_set_operand_value(lvm_instance_t *p, attribute_t *attr, unsigned char *value)
{
operand_value_t operand_value;
@@ -402,17 +440,17 @@ void lvm_set_operand_value(lvm_instance_t *p, attribute_t *attr, unsigned char *
operand_value.l = (uint32_t)value[0] << 24 | (uint32_t)value[1] << 16 | (uint32_t)value[2] << 8 | value[3];
}
- lvm_set_variable_value(p, attr->name, operand_value);
+ return lvm_set_variable_value(p, attr->name, operand_value);
}
-void lvm_set_long(lvm_instance_t *p, long l)
+lvm_status_t lvm_set_long(lvm_instance_t *p, long l)
{
operand_t op;
op.type = LVM_LONG;
op.value.l = l;
- lvm_set_operand(p, &op);
+ return lvm_set_operand(p, &op);
}
lvm_status_t lvm_register_variable(lvm_instance_t *p, char *name, operand_type_t type)
@@ -422,7 +460,7 @@ lvm_status_t lvm_register_variable(lvm_instance_t *p, char *name, operand_type_t
id = lookup(p, name);
if (id == LVM_MAX_VARIABLE_ID) {
- return VARIABLE_LIMIT_REACHED;
+ return INVALID_IDENTIFIER;
}
var = &p->variables[id];
@@ -447,18 +485,21 @@ lvm_status_t lvm_set_variable_value(lvm_instance_t *p, char *name, operand_value
return LVM_TRUE;
}
-void lvm_set_variable(lvm_instance_t *p, char *name)
+lvm_status_t lvm_set_variable(lvm_instance_t *p, char *name)
{
operand_t op;
variable_id_t id;
id = lookup(p, name);
- if (id < LVM_MAX_VARIABLE_ID) {
- DB_LOG_D("var id = %d\n", id);
- op.type = LVM_VARIABLE;
- op.value.id = id;
- lvm_set_operand(p, &op);
+ if (id == LVM_MAX_VARIABLE_ID) {
+ return INVALID_IDENTIFIER;
}
+
+ DB_LOG_D("var id = %d\n", id);
+ op.type = LVM_VARIABLE;
+ op.value.id = id;
+
+ return lvm_set_operand(p, &op);
}
static void create_intersection(derivation_t *result, derivation_t *d1, derivation_t *d2)
diff --git a/framework/src/arastorage/lvm.h b/framework/src/arastorage/lvm.h
index 6dc457d5..97643f15 100644
--- a/framework/src/arastorage/lvm.h
+++ b/framework/src/arastorage/lvm.h
@@ -172,17 +172,16 @@ lvm_status_t lvm_get_derived_range(lvm_instance_t *p, char *name, operand_value_
void lvm_print_derivations(lvm_instance_t *p);
lvm_status_t lvm_execute(lvm_instance_t *p);
lvm_status_t lvm_register_variable(lvm_instance_t *p, char *name, operand_type_t type);
-lvm_status_t lvm_set_variable_value(lvm_instance_t *p, char *name, operand_value_t value);
void lvm_print_code(lvm_instance_t *p);
lvm_ip_t lvm_jump_to_operand(lvm_instance_t *p);
lvm_ip_t lvm_shift_for_operator(lvm_instance_t *p, lvm_ip_t end);
lvm_ip_t lvm_get_end(lvm_instance_t *p);
lvm_ip_t lvm_set_end(lvm_instance_t *p, lvm_ip_t end);
-void lvm_set_op(lvm_instance_t *p, operator_t op);
-void lvm_set_relation(lvm_instance_t *p, operator_t op);
-void lvm_set_operand(lvm_instance_t *p, operand_t *op);
-void lvm_set_operand_value(lvm_instance_t *p, attribute_t *attr, unsigned char *value);
-void lvm_set_long(lvm_instance_t *p, long l);
-void lvm_set_variable(lvm_instance_t *p, char *name);
-
+lvm_status_t lvm_set_op(lvm_instance_t *p, operator_t op);
+lvm_status_t lvm_set_relation(lvm_instance_t *p, operator_t op);
+lvm_status_t lvm_set_operand(lvm_instance_t *p, operand_t *op);
+lvm_status_t lvm_set_operand_value(lvm_instance_t *p, attribute_t *attr, unsigned char *value);
+lvm_status_t lvm_set_long(lvm_instance_t *p, long l);
+lvm_status_t lvm_set_variable(lvm_instance_t *p, char *name);
+lvm_status_t lvm_set_variable_value(lvm_instance_t *p, char *name, operand_value_t value);
#endif /* LVM_H */
diff --git a/framework/src/st_things/things_stack/src/common/framework/things_data_manager.c b/framework/src/st_things/things_stack/src/common/framework/things_data_manager.c
index 692b4d87..7d5af410 100644
--- a/framework/src/st_things/things_stack/src/common/framework/things_data_manager.c
+++ b/framework/src/st_things/things_stack/src/common/framework/things_data_manager.c
@@ -658,7 +658,7 @@ easysetup_connectivity_type_e dm_get_easysetup_connectivity_type(void)
wifi_manager_softap_config_s *dm_get_softap_wifi_config(void)
{
- st_device_s *device = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)(0));
+ st_device_s *device = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)(0));
int ssid_type = (is_artik == true ? 1 : 0);
unsigned char mac_id[16] = { 0, };
char ssid_device_name[17];
@@ -967,8 +967,10 @@ static int parse_things_info_json(const char *filename)
struct things_resource_info_s *link_resource = create_resource();
cJSON *uri = cJSON_GetObjectItem(link, KEY_DEVICE_RESOURCE_URI);
- memcpy(link_resource->uri, uri->valuestring, strlen(uri->valuestring) + 1);
- THINGS_LOG_D(THINGS_INFO, TAG, "[COLLECTION] link_resource->uri : %s", (link_resource->uri));
+ if (uri) {
+ memcpy(link_resource->uri, uri->valuestring, strlen(uri->valuestring) + 1);
+ THINGS_LOG_D(THINGS_INFO, TAG, "[COLLECTION] link_resource->uri : %s", (link_resource->uri));
+ }
cJSON *types = cJSON_GetObjectItem(link, KEY_DEVICE_RESOURCE_TYPES);
if (types) {
@@ -1533,7 +1535,7 @@ const char *dm_get_things_device_type(int device_id)
//THINGS_LOG_D(THINGS_DEBUG, TAG, THINGS_FUNC_ENTRY);
st_device_s *device = NULL;
- device = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)device_id);
+ device = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)device_id);
if (device == NULL) {
THINGS_LOG_V_ERROR(THINGS_ERROR, TAG, "Device Not Exist");
@@ -1693,7 +1695,7 @@ long dm_get_num_of_dev_cnt(void)
st_device_s *dm_get_info_of_dev(unsigned long number)
{
- return (st_device_s *) hashmap_get(g_device_hmap, number);
+ return (st_device_s *)hashmap_get(g_device_hmap, number);
}
static void dm_delete_user_define_device_id(void)
@@ -1717,13 +1719,13 @@ bool dm_register_device_id(void)
return false;
}
- if ((dev_list = (st_device_s **) things_malloc(sizeof(st_device_s *) * device_cnt)) == NULL) {
+ if ((dev_list = (st_device_s **)things_malloc(sizeof(st_device_s *) * device_cnt)) == NULL) {
THINGS_LOG_ERROR(THINGS_ERROR, TAG, "st_device_s mem allocation is failed.");
return false;
}
// Set Main-Device ID
id = OCGetServerInstanceIDString();
- dev_list[0] = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)0);
+ dev_list[0] = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)0);
if (id == NULL || dev_list[0] == NULL) {
THINGS_LOG_V_ERROR(THINGS_ERROR, TAG, "Error : id = %s, Main-device =0x%X", id, dev_list[0]);
@@ -1733,7 +1735,7 @@ bool dm_register_device_id(void)
// Set Sub-Device ID
for (i = 1; i < device_cnt; i++) {
- dev_list[i] = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)i);
+ dev_list[i] = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)i);
if (dev_list[i] == NULL) {
THINGS_LOG_V_ERROR(THINGS_ERROR, TAG, "Error : device[%d] =0x%X", i, dev_list[i]);
goto GOTO_ERROR;
@@ -1810,7 +1812,7 @@ int dm_register_resource(things_server_builder_s *p_builder)
// 2. Device Capability Resources Registration
THINGS_LOG_D(THINGS_DEBUG, TAG, "BEFORE SEARCHING THE DEVICE ITEM FROM HASH TABLE");
- device = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)device_num);
+ device = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)device_num);
if (NULL != device) {
snprintf(id, sizeof(id), "%d", device->no);
@@ -1905,7 +1907,7 @@ struct things_resource_s *dm_get_resource_instance(const char *uri, const int id
int device_cnt = (int)hashmap_count(g_device_hmap);
if (device_cnt > 0 && device_cnt > id) {
- st_device_s *device = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)(id));
+ st_device_s *device = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)(id));
if (device) {
for (int index = 0; index < MAX_DEVICE_CAPABILTY_CNT; index++) {
@@ -1936,13 +1938,13 @@ int dm_get_device_information(int *cnt, st_device_s ***list)
int device_cnt = (int)hashmap_count(g_device_hmap);
if (device_cnt > 0) {
st_device_s **devices = NULL;
- if ((devices = (st_device_s **) things_malloc(sizeof(st_device_s *) * device_cnt)) == NULL) {
+ if ((devices = (st_device_s **)things_malloc(sizeof(st_device_s *) * device_cnt)) == NULL) {
THINGS_LOG_ERROR(THINGS_ERROR, TAG, "st_device_s memory allocation is failed.");
return ret;
}
for (int index = 0; index < device_cnt; index++) {
- devices[index] = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)index);
+ devices[index] = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)index);
}
(*list) = devices;
@@ -2031,7 +2033,7 @@ int dm_validate_attribute_in_request(char *rt, const void *payload)
if (rt != NULL && payload != NULL) {
// 1. Get index with resource type
unsigned long index = hashmap_get_hashval((unsigned char *)rt);
- OCRepPayload *r_payload = (OCRepPayload *) payload;
+ OCRepPayload *r_payload = (OCRepPayload *)payload;
// 2. Get resource type instance
THINGS_LOG_D(THINGS_INFO, TAG, "Index : %u rt : %s", index, rt);
@@ -2099,7 +2101,7 @@ int things_get_resource_type(const char *resource_uri, int *count, char ***resou
THINGS_LOG_D(THINGS_DEBUG, TAG, "things_get_resource_type : %s", resource_uri);
int device_cnt = (int)hashmap_count(g_device_hmap);
if (device_cnt > 0) {
- st_device_s *device = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)0);
+ st_device_s *device = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)0);
if (device != NULL) {
if (device->sig_cnt > 0) {
@@ -2180,7 +2182,7 @@ bool things_is_collection_resource(const char *res_uri)
if (device_cnt > 0) {
st_device_s *device = NULL;
- device = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)0);
+ device = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)0);
if (device == NULL) {
THINGS_LOG_V_ERROR(THINGS_ERROR, TAG, "Device Not Exist");
return NULL;
@@ -2201,7 +2203,7 @@ int things_get_child_resources(const char *col_res_uri, int *count, things_resou
{
st_device_s *device = NULL;
- device = (st_device_s *) hashmap_get(g_device_hmap, (unsigned long)0);
+ device = (st_device_s *)hashmap_get(g_device_hmap, (unsigned long)0);
if (device == NULL) {
THINGS_LOG_V_ERROR(THINGS_ERROR, TAG, "Device Not Exist");
return NULL;
diff --git a/framework/src/wifi_manager/wifi_net.c b/framework/src/wifi_manager/wifi_net.c
index a79ffa3b..30f14e33 100644
--- a/framework/src/wifi_manager/wifi_net.c
+++ b/framework/src/wifi_manager/wifi_net.c
@@ -15,6 +15,39 @@
* language governing permissions and limitations under the License.
*
****************************************************************************/
+/****************************************************************************
+ *
+ * Copyright (C) 2014 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
#include <tinyara/config.h>
#include <sys/socket.h>
diff --git a/os/fs/driver/mtd/ftl.c b/os/fs/driver/mtd/ftl.c
index c9f6f201..33330c42 100644
--- a/os/fs/driver/mtd/ftl.c
+++ b/os/fs/driver/mtd/ftl.c
@@ -1,4 +1,21 @@
/****************************************************************************
+ *
+ * Copyright 2017 Samsung Electronics All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ ****************************************************************************/
+/****************************************************************************
* drivers/mtd/ftl.c
*
* Copyright (C) 2009, 2011-2012, 2016 Gregory Nutt. All rights reserved.
diff --git a/os/fs/procfs/fs_procfscm.c b/os/fs/procfs/fs_procfscm.c
index 270e015f..c6754f99 100644
--- a/os/fs/procfs/fs_procfscm.c
+++ b/os/fs/procfs/fs_procfscm.c
@@ -16,6 +16,40 @@
*
****************************************************************************/
/****************************************************************************
+ * fs/procfs/fs_procfscm.c
+ *
+ * Copyright (C) 2014 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+/****************************************************************************
* Included Files
****************************************************************************/
diff --git a/os/fs/procfs/fs_procfsversion.c b/os/fs/procfs/fs_procfsversion.c
index aa861cd0..ba81a9de 100644
--- a/os/fs/procfs/fs_procfsversion.c
+++ b/os/fs/procfs/fs_procfsversion.c
@@ -15,6 +15,40 @@
* language governing permissions and limitations under the License.
*
****************************************************************************/
+/****************************************************************************
+ * fs/procfs/fs_procfsversion.c
+ *
+ * Copyright (C) 2014 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
/****************************************************************************
* Included Files
diff --git a/os/include/arpa/inet.h b/os/include/arpa/inet.h
index 361be692..c8b9b6dc 100644
--- a/os/include/arpa/inet.h
+++ b/os/include/arpa/inet.h
@@ -162,6 +162,8 @@ extern "C"
/**
* @brief Convert the unsigned integer netlong from network byte order to host byte order
*
+ * @details @b #include <arpa/inet.h>\n
+ * POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] nl netlong
*
* @return On success, the host byte-ordered netlong is returned. On failure, -1 is returned.
@@ -171,6 +173,8 @@ uint32_t ntohl(uint32_t nl);
/**
* @brief Convert the unsigned short integer netshort from network byte order to host byte order
*
+ * @details @b #include <arpa/inet.h>\n
+ * POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] ns netshort
*
* @return On success, the host byte-ordered netshort is returned. On failure, -1 is returned.
@@ -180,6 +184,8 @@ uint16_t ntohs(uint16_t ns);
/**
* @brief Convert the unsigned integer hostlong from host byte order to network byte order
*
+ * @details @b #include <arpa/inet.h>\n
+ * POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] hl hostlong
*
* @return On success, the network byte-ordered hostlong is returned. On failure, -1 is returned.
@@ -189,6 +195,8 @@ uint32_t htonl(uint32_t hl);
/**
* @brief Convert the unsigned short integer hostshort from host byte order to network byte order
*
+ * @details @b #include <arpa/inet.h>\n
+ * POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] hs hostshort
*
* @return On success, the network byte-ordered hostshort is returned. On failure, -1 is returned.
@@ -199,6 +207,7 @@ uint16_t htons(uint16_t hs);
/**
* @brief Convert the Internet host address from the IPv4 numbers-and-dots notation into binary form
*
+ * @details @b #include <arpa/inet.h>
* @param[in] cp the Internet host address
* @param[in] inp structure that will store the converted value (IPv4 numbers-and-dots notation)
*
@@ -209,6 +218,8 @@ int inet_aton(FAR const char *cp, FAR struct in_addr *inp);
/**
* @brief Convert the Internet host address from the IPv4 numbers-and-dots notation into binary data in network byte order.
*
+ * @details @b #include <arpa/inet.h>\n
+ * POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] cp the Internet host address
*
* @return On success, binary data in network byte order is returned. On failure, INADDR_NONE(usually -1) is returned.
@@ -223,6 +234,8 @@ in_addr_t inet_network(FAR const char *cp);
/**
* @brief Convert the Internet host address to a string in IPv4 dotted-decimal notation.
*
+ * @details @b #include <arpa/inet.h>\n
+ * POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] in the Internet host address in network byte order
*
* @return On success, a string in IPv4 dotted-decimal notation is returned. On failure, -1 is returned.
diff --git a/os/include/net/lwip/netif.h b/os/include/net/lwip/netif.h
index cbfb597b..55e5d700 100644
--- a/os/include/net/lwip/netif.h
+++ b/os/include/net/lwip/netif.h
@@ -372,6 +372,7 @@ void netif_register_with_initial_ip(struct netif *netif, netif_init_fn netif_ini
/**
* @brief Change IP address configuration for a network interface (including netmask and default gateway).
*
+ * @details @b #include <net/lwip/netif.h>
* @param[in] netif the network interface to change
* @param[in] ipaddr the new IP address
* @param[in] netmask the new netmask
@@ -395,6 +396,7 @@ void netif_remove(struct netif *netif);
/**
* @brief Find a network interface by searching for its name
*
+ * @details @b #include <net/lwip/netif.h>
* @param name the name of the netif (like netif->name) plus concatenated number
* in ascii representation (e.g. 'en0')
* @return netif the network interface
@@ -449,6 +451,7 @@ void netif_set_gw(struct netif *netif, ip_addr_t *gw);
/**
* @brief Bring an interface up, available for processing traffic.
*
+ * @details @b #include <net/lwip/netif.h>
* @param[in] netif the network interface to change
* @return none
* @since Tizen RT v1.0
@@ -458,6 +461,7 @@ void netif_set_up(struct netif *netif);
/**
* @brief Bring an interface down, disabling any traffic processing.
*
+ * @details @b #include <net/lwip/netif.h>
* @param[in] netif the network interface to change
* @return none
* @since Tizen RT v1.0
diff --git a/os/include/netdb.h b/os/include/netdb.h
index 579b73b7..3679a1e8 100644
--- a/os/include/netdb.h
+++ b/os/include/netdb.h
@@ -312,6 +312,9 @@ void endservent(void);
/**
* @brief getaddrinfo() is a function that returns information on a particular host name (such as its IP address) and loads up a struct sockaddr.
+ *
+ * @details @b #include <netdb.h>\n
+ * POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] host can be either a domain name or NULL
* @param[in] service can be a port number passed as string or a service name
* @param[in] hints can be either NULL or an addrinfo structure with the type of service requested
@@ -323,6 +326,9 @@ int getaddrinfo(const char *host, const char *service, const struct addrinfo *hi
/**
* @brief freeaddrinfo() frees the memory allocated by the getaddrinfo() function.
+ *
+ * @details @b #include <netdb.h>\n
+ * POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] ai is the head of the addrinfo list
* @return void
* @since Tizen RT v1.0
@@ -331,6 +337,8 @@ void freeaddrinfo(FAR struct addrinfo *ai);
/**
* @brief gethostbyaddr() is the function returns a corresponding hostname with given IP addresses
+ *
+ * @details @b #include <netdb.h>\n
* @param[in] *addr host address sending DNS server (e.g., 192.168.0.0)
* @return On success, hostent, the structure contains hostname of requested IP addresses, returns. On failure, hostname parameters in hostent structure is NULL
* @since Tizen RT v1.0
@@ -339,6 +347,8 @@ FAR struct hostent *gethostbyaddr(FAR const void *addr, socklen_t len, int type)
/**
* @brief gethostbyname() is the function sending DNS query to DNS server with hostname
+ *
+ * @details @b #include <netdb.h>\n
* @param[in] *name hostname sending DNS server (e.g., www.samsung.com)
* @return On success, hostent, the structure contains IP addresses of requested hostname, returns. On failure, IP address parameters in hostent structure is NULL
* @since Tizen RT v1.0
diff --git a/os/include/netinet/ether.h b/os/include/netinet/ether.h
index 5b1a5de5..278cdd8d 100644
--- a/os/include/netinet/ether.h
+++ b/os/include/netinet/ether.h
@@ -88,6 +88,8 @@ extern "C" {
/**
* @brief ether_ntoa() function converts the Ethernet host address addr given in network byte order to a string in standard hex-digits-and-colons notation.
+*
+* @details @b #include <netinet/ether.h>
* @param[in] addr is the Ethernet host address addr given in network byte order
* @return the string is returned in a statically allocated buffer
* @since Tizen RT v1.0
diff --git a/os/include/sys/socket.h b/os/include/sys/socket.h
index 3b0ef135..69f80ed9 100644
--- a/os/include/sys/socket.h
+++ b/os/include/sys/socket.h
@@ -91,6 +91,9 @@ extern "C" {
/**
* @brief creates an unbound socket in a communications domain.
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] domain the communications domain in which a socket is to be created.
* @param[in] type the type of socket to be created
* @param[in] protocol the protocol to be used with the socket
@@ -102,6 +105,9 @@ int socket(int domain, int type, int protocol);
/**
* @brief assigns an address to an unnamed socket.
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor of the socket to be bound.
* @param[in] addr pointer to a sockaddr structure containing the address to be bound to the socket
* @param[in] addrlen the length of the sockaddr structure
@@ -113,6 +119,9 @@ int bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen);
/**
* @brief requests a connection to be made on a socket
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor associated with the socket.
* @param[in] addr pointer to a sockaddr structure containing the peer address
* @param[in] addrlen the length of the sockaddr structure
@@ -124,6 +133,9 @@ int connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen);
/**
* @brief listen for socket connections and limit the queue of incoming connections
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor associated with the socket.
* @param[in] backlog the number of outstanding connections in the socket's listen queue
* @return On success, 0 is returned. On failure, -1 is returned.
@@ -134,6 +146,9 @@ int listen(int sockfd, int backlog);
/**
* @brief requests a connection to be made on a socket
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor associated with the socket.
* @param[inout] addr null or pointer to a sockaddr structure where the address of the connecting socket will be returned
* @param[inout] addrlen on input specifies the length of the supplied sockaddr structure, and on output specifies the length of the stored address.
@@ -145,6 +160,9 @@ int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
/**
* @brief send a message on a socket
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor associated with the socket.
* @param[in] buf Pointer to the buffer containing the message to send.
* @param[in] len the length of the message in bytes.
@@ -156,6 +174,9 @@ ssize_t send(int sockfd, FAR const void *buf, size_t len, int flags);
/**
* @brief send a message on a socket
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor associated with the socket.
* @param[in] buf Pointer to the buffer containing the message to send.
* @param[in] len the length of the message in bytes.
@@ -170,6 +191,9 @@ ssize_t sendto(int sockfd, FAR const void *buf, size_t len, int flags, FAR const
/**
* @brief send a message on a socket
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor associated with the socket.
* @param[out] buf Points to a buffer where the message should be stored
* @param[out] len the length in bytes of the buffer
@@ -182,6 +206,9 @@ ssize_t recv(int sockfd, FAR void *buf, size_t len, int flags);
/**
* @brief receive a message from a socket
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor associated with the socket.
* @param[out] buf Pointer to the buffer where the message should be stored.
* @param[out] len the length of the message in bytes.
@@ -196,6 +223,9 @@ ssize_t recvfrom(int sockfd, FAR void *buf, size_t len, int flags, FAR struct so
/**
* @brief shut down socket send and receive operations
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor of the socket
* @param[in] how the type of shutdown
* @return On success, 0 is returned. On failure, -1 is returned.
@@ -218,6 +248,9 @@ int closesocket(int s);
/**
* @brief set the socket options
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor of the socket
* @param[in] level the protocol level
* @param[in] option the option to be set for the socket
@@ -231,6 +264,9 @@ int setsockopt(int sockfd, int level, int option, FAR const void *value, socklen
/**
* @brief get the socket options
*
+* @details @b #include <sys/socket.h>\n
+* SYSTEM CALL API\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor of the socket
* @param[in] level the protocol level at which the option resides
* @param[in] option a single option to be retrieved
@@ -243,6 +279,8 @@ int getsockopt(int sockfd, int level, int option, FAR void *value, FAR socklen_t
/**
* @brief get the socket name
*
+* @details @b #include <sys/socket.h>\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] sockfd the file descriptor associated with the socket.
* @param[inout] addr null or pointer to a sockaddr structure where the address of the local socket will be returned
* @param[inout] addrlen on input specifies the length of the supplied sockaddr structure, and on output specifies the length of the stored address.
@@ -254,6 +292,8 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen);
/**
* @brief get the name of the peer socket
*
+* @details @b #include <sys/socket.h>\n
+* POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @param[in] s the file descriptor associated with the socket.
* @param[inout] name null or pointer to a sockaddr structure where the address of the peer socket will be returned
* @param[inout] namelen on input specifies the length of the supplied sockaddr structure, and on output specifies the length of the stored address.
diff --git a/os/net/lwip/COPYING b/os/net/lwip/COPYING
new file mode 100644
index 00000000..e23898b5
--- /dev/null
+++ b/os/net/lwip/COPYING
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2001, 2002 Swedish Institute of Computer Science.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ *
+ * This file is part of the lwIP TCP/IP stack.
+ *
+ * Author: Adam Dunkels <adam@sics.se>
+ *
+ */
+
+
diff --git a/os/pm/pm_procfs.c b/os/pm/pm_procfs.c
index 56254476..355d44fa 100644
--- a/os/pm/pm_procfs.c
+++ b/os/pm/pm_procfs.c
@@ -15,6 +15,40 @@
* language governing permissions and limitations under the License.
*
****************************************************************************/
+/****************************************************************************
+ * pm_procfs.c
+ *
+ * Copyright (C) 2014 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
/****************************************************************************
* Included Files