[-]
[+]
|
Changed |
_service:tar_git:ell.spec
|
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/.gitignore
^
|
@@ -63,6 +63,7 @@
unit/test-path
unit/test-net
unit/test-sysctl
+unit/test-minheap
unit/cert-*.pem
unit/cert-*.csr
unit/cert-*.srl
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ChangeLog
^
|
@@ -1,3 +1,19 @@
+ver 0.62:
+ Add support for cleanup functions and macros.
+ Add support for setting DHCP max attempts.
+
+ver 0.61:
+ Fix issue with not setting DHCP MAC address on start.
+ Fix issue with missing NLM_F_ACK_TLVS and NLM_F_CAPPED.
+
+ver 0.60:
+ Fix issue with missing NETLINK_EXT_ACK definition.
+ Fix issue with incorrect derivation of ECC compressed points.
+ Add support for ECC usage from SPAKE2+ key exchange protocol.
+
+ver 0.59:
+ Fix issue with symbol visibility.
+
ver 0.58:
Add support for handling sysctl settings.
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/Makefile.am
^
|
@@ -62,7 +62,8 @@
ell/tester.h \
ell/cleanup.h \
ell/netconfig.h \
- ell/sysctl.h
+ ell/sysctl.h \
+ ell/minheap.h
lib_LTLIBRARIES = ell/libell.la
@@ -151,7 +152,8 @@
ell/acd.c \
ell/tester.c \
ell/netconfig.c \
- ell/sysctl.c
+ ell/sysctl.c \
+ ell/minheap.c
ell_libell_la_LDFLAGS = -Wl,--no-undefined \
-Wl,--version-script=$(top_srcdir)/ell/ell.sym \
@@ -202,7 +204,8 @@
unit/test-time \
unit/test-path \
unit/test-net \
- unit/test-sysctl
+ unit/test-sysctl \
+ unit/test-minheap
dbus_tests = unit/test-hwdb \
unit/test-dbus \
@@ -353,6 +356,8 @@
unit_test_sysctl_LDADD = ell/libell-private.la
+unit_test_minheap_LDADD = ell/libell-private.la
+
unit_test_data_files = unit/settings.test unit/dbus.conf
if EXAMPLES
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/acinclude.m4
^
|
@@ -49,29 +49,29 @@
AC_DEFUN([COMPILER_FLAGS], [
if (test "${CFLAGS}" = ""); then
CFLAGS="-Wall -O2 -fsigned-char -fno-exceptions"
- CFLAGS+=" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
+ CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
fi
if (test "$USE_MAINTAINER_MODE" = "yes"); then
- CFLAGS+=" -Werror -Wextra"
- CFLAGS+=" -Wno-unused-parameter"
- CFLAGS+=" -Wno-missing-field-initializers"
- CFLAGS+=" -Wdeclaration-after-statement"
- CFLAGS+=" -Wmissing-declarations"
- CFLAGS+=" -Wredundant-decls"
- CFLAGS+=" -Wswitch-enum"
- CFLAGS+=" -Wtype-limits"
- CFLAGS+=" -Wformat -Wformat-security"
+ CFLAGS="$CFLAGS -Werror -Wextra"
+ CFLAGS="$CFLAGS -Wno-unused-parameter"
+ CFLAGS="$CFLAGS -Wno-missing-field-initializers"
+ CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+ CFLAGS="$CFLAGS -Wmissing-declarations"
+ CFLAGS="$CFLAGS -Wredundant-decls"
+ CFLAGS="$CFLAGS -Wswitch-enum"
+ CFLAGS="$CFLAGS -Wtype-limits"
+ CFLAGS="$CFLAGS -Wformat -Wformat-security"
if ( $CC -v 2>/dev/null | grep "gcc version" ); then
- CFLAGS+=" -Wcast-align"
+ CFLAGS="$CFLAGS -Wcast-align"
fi
if (test "$CC" = "clang"); then
- CFLAGS+=" -Werror=zero-length-array"
+ CFLAGS="$CFLAGS -Werror=zero-length-array"
fi
fi
if (test "$CC" = "clang"); then
- CFLAGS+=" -Wno-unknown-warning-option"
- CFLAGS+=" -Wno-unknown-pragmas"
+ CFLAGS="$CFLAGS -Wno-unknown-warning-option"
+ CFLAGS="$CFLAGS -Wno-unknown-pragmas"
fi
])
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/configure.ac
^
|
@@ -1,5 +1,5 @@
AC_PREREQ([2.69])
-AC_INIT([ell],[0.58])
+AC_INIT([ell],[0.62])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_AUX_DIR(build-aux)
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/acd.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -339,7 +326,7 @@
/*
* We still have an initial announcement to send, but rather
* than wait for that (potentially 2 seconds) we can remove
- * the timeout, send annouce now, and still transition to the
+ * the timeout, send announce now, and still transition to the
* defending state.
*/
if (acd->timeout)
@@ -531,14 +518,14 @@
LIB_EXPORT bool l_acd_set_debug(struct l_acd *acd,
l_acd_debug_cb_t function,
- void *user_data, l_acd_destroy_func_t destory)
+ void *user_data, l_acd_destroy_func_t destroy)
{
if (unlikely(!acd))
return false;
acd->debug_handler = function;
acd->debug_data = user_data;
- acd->debug_destroy = destory;
+ acd->debug_destroy = destroy;
return true;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/acd.h
^
|
@@ -1,34 +1,19 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_ACD_H
#define __ELL_ACD_H
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdbool.h>
-
struct l_acd;
enum l_acd_event {
@@ -55,7 +40,7 @@
bool l_acd_stop(struct l_acd *acd);
void l_acd_destroy(struct l_acd *acd);
bool l_acd_set_debug(struct l_acd *acd, l_acd_debug_cb_t function,
- void *user_data, l_acd_destroy_func_t destory);
+ void *user_data, l_acd_destroy_func_t destroy);
bool l_acd_set_skip_probes(struct l_acd *acd, bool skip);
bool l_acd_set_defend_policy(struct l_acd *acd,
enum l_acd_defend_policy policy);
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/asn1-private.h
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2017 Intel Corporation
*
- * Copyright (C) 2017 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#define ASN1_ID(class, pc, tag) (((class) << 6) | ((pc) << 5) | (tag))
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/base64.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/base64.h
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_BASE64_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/cert-crypto.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/cert-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
struct asn1_oid;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/cert.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/cert.h
^
|
@@ -1,35 +1,20 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_CERT_H
#define __ELL_CERT_H
+#include <stddef.h>
+#include <ell/cleanup.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stddef.h>
-#include <ell/cleanup.h>
-
struct l_queue;
struct l_cert;
struct l_certchain;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/checksum.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/checksum.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_CHECKSUM_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/cipher.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -746,8 +731,6 @@
/* ARC4 implementation copyright (c) 2001 Niels Möller */
-#define SWAP(a, b) do { uint8_t _t = a; a = b; b = _t; } while (0)
-
static void arc4_set_key(uint8_t *S, const uint8_t *key, size_t key_length)
{
unsigned int i;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/cipher.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_CIPHER_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/cleanup.h
^
|
@@ -1,27 +1,15 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2021 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2021 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#pragma once
+#define __L_AUTODESTRUCT(func) \
+ __attribute((cleanup(_l_ ## func ## _cleanup)))
+
#define DEFINE_CLEANUP_FUNC(func) \
inline __attribute__((always_inline)) \
- void func ## _cleanup(void *p) { func(*(void **) p); }
+ void _l_ ## func ## _cleanup(void *p) { func(*(void **) p); }
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-client.c
^
|
@@ -1,24 +1,9 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
+ * Copyright (C) 2017 Codecoup
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- * Copyright (C) 2017 Codecoup. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-client.h
^
|
@@ -1,24 +1,9 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
+ * Copyright (C) 2017 Codecoup
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- * Copyright (C) 2017 Codecoup. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_DBUS_CLIENT_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-filter.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2016 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2016 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-message.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-name-cache.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2016 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2016 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include <endian.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-service.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-service.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_SERVICE_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus-util.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dbus.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_DBUS_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp-lease.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
struct l_dhcp_client;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp-server.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -1183,14 +1168,14 @@
LIB_EXPORT bool l_dhcp_server_set_debug(struct l_dhcp_server *server,
l_dhcp_debug_cb_t function,
- void *user_data, l_dhcp_destroy_cb_t destory)
+ void *user_data, l_dhcp_destroy_cb_t destroy)
{
if (unlikely(!server))
return false;
server->debug_handler = function;
server->debug_data = user_data;
- server->debug_destroy = destory;
+ server->debug_destroy = destroy;
return true;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp-transport.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp-util.c
^
|
@@ -1,24 +1,14 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdint.h>
#include <linux/types.h>
#include <errno.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -60,6 +45,8 @@
client->state = (s)
#define BITS_PER_LONG (sizeof(unsigned long) * 8)
+#define CLIENT_MAX_ATTEMPT_LIMIT 30
+#define CLIENT_MIN_ATTEMPT_LIMIT 3
enum dhcp_state {
DHCP_STATE_INIT,
@@ -174,6 +161,7 @@
uint32_t rtnl_add_cmdid;
struct l_rtnl_address *rtnl_configured_address;
uint8_t attempt;
+ uint8_t max_attempts;
l_dhcp_client_event_cb_t event_handler;
void *event_data;
l_dhcp_destroy_cb_t event_destroy;
@@ -573,9 +561,16 @@
* "The retransmission delay SHOULD be doubled with subsequent
* retransmissions up to a maximum of 64 seconds.
*/
- client->attempt += 1;
- next_timeout = minsize(2 << client->attempt, 64);
- break;
+ if (client->attempt < client->max_attempts) {
+ next_timeout = minsize(2 << client->attempt++, 64);
+ break;
+ }
+
+ CLIENT_DEBUG("Max request/discover attempts reached");
+
+ dhcp_client_event_notify(client,
+ L_DHCP_CLIENT_EVENT_MAX_ATTEMPTS_REACHED);
+ return;
case DHCP_STATE_INIT:
case DHCP_STATE_INIT_REBOOT:
case DHCP_STATE_REBOOTING:
@@ -1003,6 +998,7 @@
client->state = DHCP_STATE_INIT;
client->ifindex = ifindex;
+ client->max_attempts = CLIENT_MAX_ATTEMPT_LIMIT;
/* Enable these options by default */
dhcp_enable_option(client, L_DHCP_OPTION_SUBNET_MASK);
@@ -1324,3 +1320,21 @@
client->rtnl = rtnl;
return true;
}
+
+LIB_EXPORT bool l_dhcp_client_set_max_attempts(struct l_dhcp_client *client,
+ uint8_t attempts)
+{
+ if (unlikely(!client))
+ return false;
+
+ if (unlikely(client->state != DHCP_STATE_INIT))
+ return false;
+
+ if (attempts < CLIENT_MIN_ATTEMPT_LIMIT ||
+ attempts > CLIENT_MAX_ATTEMPT_LIMIT)
+ return false;
+
+ client->max_attempts = attempts;
+
+ return true;
+}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp.h
^
|
@@ -1,34 +1,19 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_DHCP_H
#define __ELL_DHCP_H
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdbool.h>
-
struct l_dhcp_client;
struct l_dhcp_lease;
struct l_netlink;
@@ -56,6 +41,7 @@
L_DHCP_CLIENT_EVENT_LEASE_EXPIRED,
L_DHCP_CLIENT_EVENT_LEASE_RENEWED,
L_DHCP_CLIENT_EVENT_NO_LEASE,
+ L_DHCP_CLIENT_EVENT_MAX_ATTEMPTS_REACHED,
};
enum l_dhcp_server_event {
@@ -88,6 +74,8 @@
bool l_dhcp_client_set_rtnl(struct l_dhcp_client *client,
struct l_netlink *rtnl);
+bool l_dhcp_client_set_max_attempts(struct l_dhcp_client *client,
+ uint8_t attempts);
const struct l_dhcp_lease *l_dhcp_client_get_lease(
const struct l_dhcp_client *client);
@@ -134,7 +122,7 @@
const char *end_ip);
bool l_dhcp_server_set_debug(struct l_dhcp_server *server,
l_dhcp_debug_cb_t function,
- void *user_data, l_dhcp_destroy_cb_t destory);
+ void *user_data, l_dhcp_destroy_cb_t destroy);
bool l_dhcp_server_set_event_handler(struct l_dhcp_server *server,
l_dhcp_server_event_cb_t handler,
void *user_data,
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp6-lease.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp6-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
struct l_dhcp6_client;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp6-transport.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp6.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -1617,7 +1602,7 @@
/*
* Set the link local address to use instead of binding to the in6addr_any
- * address by default. This allows multiple clients to coexist simulatenously
+ * address by default. This allows multiple clients to coexist simultaneously
* on different ifindexes
*/
LIB_EXPORT bool l_dhcp6_client_set_link_local_address(
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dhcp6.h
^
|
@@ -1,34 +1,19 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_DHCP6_H
#define __ELL_DHCP6_H
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdbool.h>
-
struct l_dhcp6_client;
struct l_dhcp6_lease;
struct l_netlink;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dir.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2017 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2017 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -30,8 +15,10 @@
#include <limits.h>
#include <sys/inotify.h>
#include <errno.h>
+#include <sys/stat.h>
#include "private.h"
+#include "useful.h"
#include "queue.h"
#include "io.h"
#include "dir.h"
@@ -351,3 +338,53 @@
l_free(watch);
}
+
+/**
+ * l_dir_create:
+ * @abspath: Absolute path of the directory to create
+ *
+ * Attempts to create a directory tree given by @abspath. @abspath must be
+ * an absolute path.
+ *
+ * Returns: 0 if successful, a negative errno otherwise
+ **/
+LIB_EXPORT int l_dir_create(const char *abspath)
+{
+ static const mode_t create_mode = S_IRUSR | S_IWUSR | S_IXUSR;
+ struct stat st;
+ _auto_(l_free) char *dir = NULL;
+ const char *prev, *next;
+ int err;
+
+ if (!abspath || abspath[0] != '/')
+ return -EINVAL;
+
+ err = stat(abspath, &st);
+ if (!err) {
+ /* File exists */
+ if (S_ISDIR(st.st_mode))
+ return 0;
+
+ return -ENOTDIR;
+ }
+
+ if (errno != ENOENT)
+ return -errno;
+
+ dir = l_malloc(strlen(abspath) + 1);
+ dir[0] = '\0';
+
+ for (prev = abspath; prev[0] && (next = strchrnul(prev + 1, '/'));
+ prev = next) {
+ /* Skip consecutive '/' characters */
+ if (next - prev == 1)
+ continue;
+
+ strncat(dir, prev, next - prev);
+
+ if (mkdir(dir, create_mode) == -1 && errno != EEXIST)
+ return -errno;
+ }
+
+ return 0;
+}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/dir.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2017 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2017 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_DIR_H
@@ -48,6 +33,8 @@
l_dir_watch_destroy_func_t destroy);
void l_dir_watch_destroy(struct l_dir_watch *watch);
+int l_dir_create(const char *abspath);
+
#ifdef __cplusplus
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ecc-external.c
^
|
@@ -314,6 +314,81 @@
_vli_add(result, result, mod, ndigits);
}
+/* Counts the number of 64-bit "digits" in vli. */
+static unsigned int _vli_num_digits(const uint64_t *vli, unsigned int ndigits)
+{
+ int i;
+
+ /* Search from the end until we find a non-zero digit.
+ * We do it in reverse because we expect that most digits will
+ * be nonzero.
+ */
+ for (i = ndigits - 1; i >= 0 && vli[i] == 0; i--);
+
+ return (i + 1);
+}
+
+/* Counts the number of bits required for vli. */
+static unsigned int _vli_num_bits(const uint64_t *vli, unsigned int ndigits)
+{
+ unsigned int i, num_digits;
+ uint64_t digit;
+
+ num_digits = _vli_num_digits(vli, ndigits);
+ if (num_digits == 0)
+ return 0;
+
+ digit = vli[num_digits - 1];
+ for (i = 0; digit; i++)
+ digit >>= 1;
+
+ return ((num_digits - 1) * 64 + i);
+}
+
+/* Computes result = product % mod, where product is 2N words long.
+ * Currently only designed to work for curve_p or curve_n.
+ */
+void _vli_mmod_slow(uint64_t *result, const uint64_t *product,
+ const uint64_t *mod, unsigned int ndigits)
+{
+ uint64_t mod_m[2 * L_ECC_MAX_DIGITS];
+ uint64_t tmp[2 * L_ECC_MAX_DIGITS];
+ uint64_t *v[2] = { tmp, (uint64_t *) product };
+ uint64_t carry = 0;
+ unsigned int i;
+ /* Shift mod so its highest set bit is at the maximum position. */
+ int shift = (ndigits * 2 * 64) - _vli_num_bits(mod, ndigits);
+ int word_shift = shift / 64;
+ int bit_shift = shift % 64;
+
+ vli_clear(mod_m, word_shift);
+ if (bit_shift > 0) {
+ for (i = 0; i < ndigits; ++i) {
+ mod_m[word_shift + i] = (mod[i] << bit_shift) | carry;
+ carry = mod[i] >> (64 - bit_shift);
+ }
+ } else
+ vli_set(mod_m + word_shift, mod, ndigits);
+
+ for (i = 1; shift >= 0; --shift) {
+ uint64_t borrow = 0;
+ unsigned int j;
+
+ for (j = 0; j < ndigits * 2; ++j) {
+ uint64_t diff = v[i][j] - mod_m[j] - borrow;
+
+ if (diff != v[i][j])
+ borrow = (diff > v[i][j]);
+ v[1 - i][j] = diff;
+ }
+ i = !(i ^ borrow); /* Swap the index if there was no borrow */
+ _vli_rshift1(mod_m, ndigits);
+ mod_m[ndigits - 1] |= mod_m[ndigits] << (64 - 1);
+ _vli_rshift1(mod_m + ndigits, ndigits);
+ }
+ vli_set(result, v[i], ndigits);
+}
+
/* Computes p_result = p_product % curve_p.
* See algorithm 5 and 6 from
* http://www.isys.uni-klu.ac.at/PDF/2001-0126-MT.pdf
@@ -550,7 +625,7 @@
/* Computes result = product % curve_prime
* from http://www.nsa.gov/ia/_files/nist-routines.pdf
*/
-bool _vli_mmod_fast(uint64_t *result, uint64_t *product,
+bool _vli_mmod_fast(uint64_t *result, const uint64_t *product,
const uint64_t *curve_prime, unsigned int ndigits)
{
uint64_t tmp[2 * L_ECC_MAX_DIGITS];
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ecc-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include <stdbool.h>
@@ -101,7 +86,10 @@
void _vli_rshift1(uint64_t *vli, unsigned int ndigits);
-bool _vli_mmod_fast(uint64_t *result, uint64_t *product,
+void _vli_mmod_slow(uint64_t *result, const uint64_t *product,
+ const uint64_t *mod, unsigned int ndigits);
+
+bool _vli_mmod_fast(uint64_t *result, const uint64_t *product,
const uint64_t *curve_prime, unsigned int ndigits);
void _vli_mod_mult_fast(uint64_t *result, const uint64_t *left,
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ecc.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -562,8 +547,24 @@
if (!_ecc_compute_y(curve, p->y, p->x))
goto failed;
+ /*
+ * This is determining whether or not to subtract the Y
+ * coordinate from P. According to ANSI X9.62 an even Y should
+ * be prefixed with 02 (BIT0) and an odd Y should be prefixed
+ * with 03 (BIT1). If this is not the case, subtract Y from P.
+ *
+ * ANSI X9.62
+ * 4.3.6 Point-to-Octet-String Conversion
+ *
+ * 2. If the compressed form is used, then do the following:
+ * 2.1. Compute the bit ~Yp . (See Section 4.2.)
+ * 2.2. Assign the value 02 to the single octet PC if ~Yp
+ * is 0, or the value 03 if ~Yp is 1.
+ * 2.3. The result is the octet string PO = PC || X
+ */
+
sub = secure_select(type == L_ECC_POINT_TYPE_COMPRESSED_BIT0,
- !(p->y[0] & 1), p->y[0] & 1);
+ p->y[0] & 1, !(p->y[0] & 1));
_vli_mod_sub(tmp, curve->p, p->y, curve->p, curve->ndigits);
@@ -807,7 +808,7 @@
/*
* Build a scalar = value modulo p where p is the prime number for a given
- * curve. bytes can contain a numer with up to 2x number of digits as the
+ * curve. bytes can contain a number with up to 2x number of digits as the
* curve. This is used in Hash to Curve calculations.
*/
LIB_EXPORT struct l_ecc_scalar *l_ecc_scalar_new_modp(
@@ -845,6 +846,41 @@
return NULL;
}
+LIB_EXPORT struct l_ecc_scalar *l_ecc_scalar_new_modn(
+ const struct l_ecc_curve *curve,
+ const void *bytes, size_t len)
+{
+ struct l_ecc_scalar *c;
+ uint64_t tmp[2 * L_ECC_MAX_DIGITS];
+ unsigned int ndigits = len / 8;
+
+ if (!bytes)
+ return NULL;
+
+ if (len % 8)
+ return NULL;
+
+ if (ndigits > curve->ndigits * 2)
+ return NULL;
+
+ c = _ecc_constant_new(curve, NULL, 0);
+ if (!c)
+ return NULL;
+
+ memset(tmp, 0, sizeof(tmp));
+ _ecc_be2native(tmp, bytes, ndigits);
+
+ _vli_mmod_slow(c->c, tmp, curve->n, curve->ndigits);
+
+ if (!_vli_is_zero_or_one(c->c, curve->ndigits) &&
+ secure_memcmp_64(curve->n, c->c, curve->ndigits) > 0)
+ return c;
+
+ l_ecc_scalar_free(c);
+
+ return NULL;
+}
+
/*
* Takes a buffer of the same size as the curve and scales it to a range
* 1..n using value = (value mod (n - 1)) + 1. For the curves we support
@@ -939,6 +975,18 @@
return true;
}
+LIB_EXPORT bool l_ecc_point_multiply_g(struct l_ecc_point *ret,
+ const struct l_ecc_scalar *scalar)
+{
+ if (unlikely(!ret || !scalar))
+ return false;
+
+ _ecc_point_mult(ret, &scalar->curve->g, scalar->c, NULL,
+ scalar->curve->p);
+
+ return true;
+}
+
LIB_EXPORT bool l_ecc_point_add(struct l_ecc_point *ret,
const struct l_ecc_point *a,
const struct l_ecc_point *b)
@@ -1010,3 +1058,8 @@
return ((memcmp(a->x, b->x, a->curve->ndigits * 8) == 0) &&
(memcmp(a->y, b->y, a->curve->ndigits * 8) == 0));
}
+
+LIB_EXPORT bool l_ecc_point_is_infinity(const struct l_ecc_point *p)
+{
+ return _ecc_point_is_zero(p);
+}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ecc.h
^
|
@@ -1,35 +1,20 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_ECC_H
#define __ELL_ECC_H
+#include <sys/types.h>
+#include <ell/cleanup.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <sys/types.h> // for ssize_t
-#include <ell/cleanup.h>
-
#define L_ECC_MAX_DIGITS 6
#define L_ECC_SCALAR_MAX_BYTES L_ECC_MAX_DIGITS * 8
#define L_ECC_POINT_MAX_BYTES L_ECC_SCALAR_MAX_BYTES * 2
@@ -81,6 +66,8 @@
const struct l_ecc_curve *curve);
struct l_ecc_scalar *l_ecc_scalar_new_modp(const struct l_ecc_curve *curve,
const void *buf, size_t len);
+struct l_ecc_scalar *l_ecc_scalar_new_modn(const struct l_ecc_curve *curve,
+ const void *buf, size_t len);
struct l_ecc_scalar *l_ecc_scalar_new_reduced_1_to_n(
const struct l_ecc_curve *curve,
const void *buf, size_t len);
@@ -98,6 +85,8 @@
bool l_ecc_point_multiply(struct l_ecc_point *ret,
const struct l_ecc_scalar *scalar,
const struct l_ecc_point *point);
+bool l_ecc_point_multiply_g(struct l_ecc_point *ret,
+ const struct l_ecc_scalar *scalar);
bool l_ecc_point_add(struct l_ecc_point *ret, const struct l_ecc_point *a,
const struct l_ecc_point *b);
bool l_ecc_point_inverse(struct l_ecc_point *p);
@@ -114,6 +103,7 @@
bool l_ecc_points_are_equal(const struct l_ecc_point *a,
const struct l_ecc_point *b);
+bool l_ecc_point_is_infinity(const struct l_ecc_point *p);
#ifdef __cplusplus
}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ecdh.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ecdh.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_ECDH_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ell.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include <ell/util.h>
@@ -67,3 +52,4 @@
#include <ell/tester.h>
#include <ell/netconfig.h>
#include <ell/sysctl.h>
+#include <ell/minheap.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ell.sym
^
|
@@ -49,6 +49,8 @@
l_strv_eq;
/* utf8 */
l_ascii_table;
+ l_ascii_strdown;
+ l_ascii_strup;
l_utf8_get_codepoint;
l_utf8_validate;
l_utf8_strlen;
@@ -255,6 +257,7 @@
l_dhcp_client_set_rtnl;
l_dhcp_client_set_hostname;
l_dhcp_client_get_lease;
+ l_dhcp_client_set_max_attempts;
l_dhcp_client_start;
l_dhcp_client_stop;
l_dhcp_client_set_event_handler;
@@ -306,10 +309,12 @@
l_dhcp6_lease_get_preferred_lifetime;
l_dhcp6_lease_get_start_time;
/* dir */
+ l_dir_create;
l_dir_watch_new;
l_dir_watch_destroy;
/* file */
l_file_get_contents;
+ l_file_set_contents;
/* genl */
l_genl_new;
l_genl_ref;
@@ -593,11 +598,13 @@
l_ecc_point_get_data;
l_ecc_point_inverse;
l_ecc_point_multiply;
+ l_ecc_point_multiply_g;
l_ecc_point_new;
l_ecc_point_from_sswu;
l_ecc_point_clone;
l_ecc_point_get_curve;
l_ecc_points_are_equal;
+ l_ecc_point_is_infinity;
l_ecc_scalar_add;
l_ecc_scalar_free;
l_ecc_scalar_get_data;
@@ -606,6 +613,7 @@
l_ecc_scalar_new;
l_ecc_scalar_new_random;
l_ecc_scalar_new_modp;
+ l_ecc_scalar_new_modn;
l_ecc_scalar_new_reduced_1_to_n;
l_ecc_scalar_sum_x;
l_ecc_scalars_are_equal;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/file.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2017 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2017 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -30,9 +15,12 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
+#include <stdlib.h>
+#include <stdio.h>
#include "file.h"
#include "private.h"
+#include "useful.h"
/**
* l_file_get_contents:
@@ -87,3 +75,56 @@
close(fd);
return NULL;
}
+
+/**
+ * l_file_set_contents:
+ * @filename: Destination filename
+ * @contents: Pointer to the contents
+ * @len: Length in bytes of the contents buffer
+ *
+ * Given a content buffer, write it to a file named @filename. This function
+ * ensures that the contents are consistent (i.e. due to a crash right after
+ * opening or during write() by writing the contents to a temporary which is then
+ * renamed to @filename.
+ *
+ * Returns: 0 if successful, a negative errno otherwise
+ **/
+LIB_EXPORT int l_file_set_contents(const char *filename,
+ const void *contents, size_t len)
+{
+ _auto_(l_free) char *tmp_path = NULL;
+ ssize_t r;
+ int fd;
+
+ if (!filename || !contents)
+ return -EINVAL;
+
+ tmp_path = l_strdup_printf("%s.XXXXXX.tmp", filename);
+
+ fd = L_TFR(mkostemps(tmp_path, 4, O_CLOEXEC));
+ if (fd == -1)
+ return -errno;
+
+ r = L_TFR(write(fd, contents, len));
+ L_TFR(close(fd));
+
+ if (r != (ssize_t) len) {
+ r = -EIO;
+ goto error_write;
+ }
+
+ /*
+ * Now that the file contents are written, rename to the real
+ * file name; this way we are uniquely sure that the whole
+ * thing is there.
+ * conserve @r's value from 'write'
+ */
+ if (rename(tmp_path, filename) == -1)
+ r = -errno;
+
+error_write:
+ if (r < 0)
+ unlink(tmp_path);
+
+ return r < 0 ? r : 0;
+}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/file.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2017 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2017 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_FILE_H
@@ -28,6 +13,7 @@
#endif
void *l_file_get_contents(const char *filename, size_t *out_len);
+int l_file_set_contents(const char *filename, const void *data, size_t len);
#ifdef __cplusplus
}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/genl.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -255,7 +240,8 @@
struct l_genl_attr attr_op;
uint32_t id = 0, flags = 0;
- l_genl_attr_recurse(attr, &attr_op);
+ if (!l_genl_attr_recurse(attr, &attr_op))
+ continue;
while (l_genl_attr_next(&attr_op, &type, &len, &data)) {
switch (type) {
@@ -284,7 +270,8 @@
const char *name = NULL;
uint32_t id = 0;
- l_genl_attr_recurse(attr, &attr_grp);
+ if (!l_genl_attr_recurse(attr, &attr_grp))
+ continue;
while (l_genl_attr_next(&attr_grp, &type, &len, &data)) {
switch (type) {
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/genl.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_GENL_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/gpio.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Geanix
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Geanix. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/gpio.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Geanix
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Geanix. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_GPIO_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/gvariant-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
struct l_dbus_message_iter;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/gvariant-util.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/hashmap.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -47,7 +32,7 @@
/**
* l_hashmap:
*
- * Opague object representing the hash table.
+ * Opaque object representing the hash table.
*/
struct l_hashmap {
l_hashmap_hash_func_t hash_func;
@@ -311,7 +296,7 @@
* @hashmap: hash table object
* @destroy: destroy function
*
- * Free hash table and call @destory on all remaining entries.
+ * Free hash table and call @destroy on all remaining entries.
*
* NOTE: While the destroy is in progress, the hashmap is assumed to be
* invariant. The behavior of adding or removing entries while a destroy
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/hashmap.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_HASHMAP_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/hwdb.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/hwdb.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_HWDB_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/icmp6-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
struct route_info {
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/icmp6.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/icmp6.h
^
|
@@ -1,34 +1,19 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_ICMP6_H
#define __ELL_ICMP6_H
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdbool.h>
-
struct l_icmp6_client;
struct l_icmp6_router;
struct l_netlink;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/idle.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -43,7 +28,7 @@
/**
* l_idle:
*
- * Opague object representing the idle time event.
+ * Opaque object representing the idle time event.
*/
struct l_idle {
union {
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/idle.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_IDLE_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/io.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -44,7 +29,7 @@
/**
* l_io:
*
- * Opague object representing the IO.
+ * Opaque object representing the IO.
*/
struct l_io {
int fd;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/io.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_IO_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/key.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2016 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2016 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/key.h
^
|
@@ -1,38 +1,23 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2016 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2016 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_KEY_H
#define __ELL_KEY_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stddef.h>
#include <stdbool.h>
#include <ell/cleanup.h>
#include <ell/checksum.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct l_key;
struct l_keyring;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/log.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/log.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_LOG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/main-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2021 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2021 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
typedef void (*watch_event_cb_t) (int fd, uint32_t events, void *user_data);
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/main.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -583,7 +568,7 @@
/**
* l_main_quit:
*
- * Teminate the running main loop
+ * Terminate the running main loop
*
* Returns: #true when terminating the main loop or #false in case of failure
**/
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/main.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_MAIN_H
|
[-]
[+]
|
Added |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/minheap.c
^
|
@@ -0,0 +1,18 @@
+/*
+ * Embedded Linux library
+ * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2023 Cruise LLC
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+/**
+ * SECTION:minheap
+ * @short_description: Minimum Heap Support
+ *
+ * Minimum Heap support
+ */
|
[-]
[+]
|
Added |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/minheap.h
^
|
@@ -0,0 +1,195 @@
+/*
+ * Embedded Linux library
+ * Copyright (C) 2023 Cruise LLC
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef __ELL_MINHEAP_H
+#define __ELL_MINHEAP_H
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * GCC seems to only inline the less and swap operations when the ops struct
+ * is declared static const and passed in to the individual operations
+ * directly. Using a const member inside l_minheap doesn't have the same
+ * effect.
+ */
+struct l_minheap_ops {
+ size_t elem_size;
+ bool (*less)(const void *lhs, const void *rhs);
+ void (*swap)(void *lhs, void *rhs);
+};
+
+struct l_minheap {
+ void *data;
+ uint32_t used;
+ uint32_t capacity;
+};
+
+static inline __attribute__((always_inline))
+void __minheap_sift_down(void *data, uint32_t used, uint32_t pos,
+ const struct l_minheap_ops *ops)
+{
+ uint32_t left;
+ uint32_t right;
+ uint32_t smallest;
+
+ while ((left = pos * 2 + 1) < used) {
+ smallest = ops->less(data + left * ops->elem_size,
+ data + pos * ops->elem_size) ? left : pos;
+
+ if ((right = pos * 2 + 2) < used) {
+ if (ops->less(data + right * ops->elem_size,
+ data + smallest * ops->elem_size))
+ smallest = right;
+ }
+
+ if (smallest == pos)
+ break;
+
+ ops->swap(data + pos * ops->elem_size,
+ data + smallest * ops->elem_size);
+ pos = smallest;
+ }
+}
+
+static inline __attribute__((always_inline))
+void __minheap_sift_up(void *data, uint32_t pos,
+ const struct l_minheap_ops *ops)
+{
+ uint32_t parent;
+
+ while (pos) {
+ parent = (pos - 1) / 2;
+
+ if (ops->less(data + parent * ops->elem_size,
+ data + pos * ops->elem_size))
+ break;
+
+ ops->swap(data + parent * ops->elem_size,
+ data + pos * ops->elem_size);
+ pos = parent;
+ }
+}
+
+static inline __attribute__((always_inline))
+void __minheap_sift_updown(void *data, uint32_t used, uint32_t pos,
+ const struct l_minheap_ops *ops)
+{
+ uint32_t parent = (pos - 1) / 2;
+
+ if (ops->less(data + pos * ops->elem_size,
+ data + parent * ops->elem_size)) {
+ ops->swap(data + parent * ops->elem_size,
+ data + pos * ops->elem_size);
+ __minheap_sift_up(data, parent, ops);
+ return;
+ }
+
+ __minheap_sift_down(data, used, pos, ops);
+}
+
+static inline __attribute__((always_inline))
+void l_minheap_init(struct l_minheap *minheap, void *data,
+ uint32_t used, uint32_t capacity,
+ const struct l_minheap_ops *ops)
+{
+ int i;
+
+ for (i = used >> 1; i >= 0; i--)
+ __minheap_sift_down(data, used, i, ops);
+
+ minheap->data = data;
+ minheap->used = used;
+ minheap->capacity = capacity;
+}
+
+static inline __attribute__((always_inline))
+bool l_minheap_pop(struct l_minheap *minheap,
+ const struct l_minheap_ops *ops, void *out)
+{
+ if (!minheap)
+ return false;
+
+ if (!minheap->used)
+ return false;
+
+ if (out)
+ memcpy(out, minheap->data, ops->elem_size);
+
+ minheap->used -= 1;
+ memcpy(minheap->data,
+ minheap->data + minheap->used * ops->elem_size,
+ ops->elem_size);
+ __minheap_sift_down(minheap->data, minheap->used, 0, ops);
+
+ return true;
+}
+
+static inline __attribute__((always_inline))
+bool l_minheap_pop_push(struct l_minheap *minheap,
+ const struct l_minheap_ops *ops, void *inout)
+{
+ if (!minheap)
+ return false;
+
+ if (!minheap->used)
+ return false;
+
+ ops->swap(inout, minheap->data);
+ __minheap_sift_down(minheap->data, minheap->used, 0, ops);
+ return true;
+}
+
+static inline __attribute__((always_inline))
+bool l_minheap_push(struct l_minheap *minheap,
+ const struct l_minheap_ops *ops, const void *in)
+{
+ if (!minheap)
+ return false;
+
+ if (minheap->used >= minheap->capacity)
+ return false;
+
+ memcpy(minheap->data + minheap->used * ops->elem_size,
+ in, ops->elem_size);
+ __minheap_sift_up(minheap->data, minheap->used, ops);
+ minheap->used += 1;
+
+ return true;
+}
+
+static inline __attribute__((always_inline))
+bool l_minheap_delete(struct l_minheap *minheap, uint32_t pos,
+ const struct l_minheap_ops *ops)
+{
+ if (!minheap)
+ return false;
+
+ if (!minheap->used || pos >= minheap->used)
+ return false;
+
+ minheap->used -= 1;
+ if (minheap->used == pos)
+ return true;
+
+ memcpy(minheap->data + pos * ops->elem_size,
+ minheap->data + minheap->used * ops->elem_size,
+ ops->elem_size);
+ __minheap_sift_down(minheap->data, minheap->used, pos, ops);
+
+ return true;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ELL_MINHEAP_H */
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/missing.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include <sys/syscall.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/net-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
char *net_domain_name_parse(const uint8_t *raw, size_t raw_len);
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/net.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/net.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_NET_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/netconfig.c
^
|
@@ -1,29 +1,18 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2022 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2022 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <asm/types.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <sys/socket.h>
#include <net/if.h>
#include <linux/types.h>
#include <linux/if_ether.h>
@@ -560,6 +549,12 @@
netconfig_failed(nc, AF_INET);
break;
+ case L_DHCP_CLIENT_EVENT_MAX_ATTEMPTS_REACHED:
+ L_WARN_ON(nc->v4_configured);
+
+ netconfig_failed(nc, AF_INET);
+
+ break;
}
}
@@ -1944,10 +1939,10 @@
/*
* Handle the case of no link-local address having been found during
* the dump. If nc->ifaddr6_dump_cmd_id is 0, we have found one or
- * the dump is being cancelled. Otherwise try disabing the
+ * the dump is being cancelled. Otherwise try disabling the
* "disable_ipv6" setting for the interface since it may have been
* enabled. Also write "addr_gen_mode" which triggers regerating
- * the link-local addresss on the interface in the kernel if it
+ * the link-local address on the interface in the kernel if it
* was previously removed.
*/
if (!nc->ifaddr6_dump_cmd_id || !nc->started)
@@ -1981,6 +1976,9 @@
if (!netconfig_check_config(netconfig))
return false;
+ if (!l_net_get_mac_address(netconfig->ifindex, netconfig->mac))
+ return false;
+
if (!netconfig->v4_enabled)
goto configure_ipv6;
@@ -1995,6 +1993,9 @@
goto configure_ipv6;
}
+ l_dhcp_client_set_address(netconfig->dhcp_client, ARPHRD_ETHER,
+ netconfig->mac, ETH_ALEN);
+
if (!l_dhcp_client_start(netconfig->dhcp_client))
return false;
@@ -2075,9 +2076,6 @@
l_queue_push_tail(addr_wait_list, netconfig);
netconfig->have_lla = false;
- if (!l_net_get_mac_address(netconfig->ifindex, netconfig->mac))
- goto unregister;
-
l_dhcp6_client_set_address(netconfig->dhcp6_client, ARPHRD_ETHER,
netconfig->mac, ETH_ALEN);
l_icmp6_client_set_address(netconfig->icmp6_client, netconfig->mac);
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/netconfig.h
^
|
@@ -1,34 +1,19 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2022 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2022 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_NETCONFIG_H
#define __ELL_NETCONFIG_H
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdbool.h>
-
struct l_dhcp_client;
struct l_dhcp6_client;
struct l_icmp6_client;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/netlink-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef SOL_NETLINK
@@ -35,6 +20,17 @@
#define NLA_DATA(nla) ((void*)(((char*)(nla)) + NLA_LENGTH(0)))
#define NLA_PAYLOAD(nla) ((int)((nla)->nla_len) - NLA_LENGTH(0))
+#ifndef NETLINK_EXT_ACK
+#define NETLINK_EXT_ACK 11
+enum nlmsgerr_attrs {
+ NLMSGERR_ATTR_UNUSED,
+ NLMSGERR_ATTR_MSG,
+ NLMSGERR_ATTR_OFFS,
+};
+#define NLM_F_CAPPED 0x100
+#define NLM_F_ACK_TLVS 0x200
+#endif
+
bool netlink_parse_ext_ack_error(const struct nlmsghdr *nlmsg,
const char **out_error_msg,
uint32_t *out_error_offset);
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/netlink.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/netlink.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_NETLINK_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/path.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/path.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_PATH_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/pem-private.h
^
|
@@ -1,29 +1,10 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/pem.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/pem.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_PEM_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include <ell/util.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/queue.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -38,7 +23,7 @@
/**
* l_queue:
*
- * Opague object representing the queue.
+ * Opaque object representing the queue.
*/
struct l_queue {
struct l_queue_entry *head;
@@ -74,7 +59,7 @@
* @queue: queue object
* @destroy: destroy function
*
- * Free queue and call @destory on all remaining entries.
+ * Free queue and call @destroy on all remaining entries.
**/
LIB_EXPORT void l_queue_destroy(struct l_queue *queue,
l_queue_destroy_func_t destroy)
@@ -88,7 +73,7 @@
* @queue: queue object
* @destroy: destroy function
*
- * Clear queue and call @destory on all remaining entries.
+ * Clear queue and call @destroy on all remaining entries.
**/
LIB_EXPORT void l_queue_clear(struct l_queue *queue,
l_queue_destroy_func_t destroy)
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/queue.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_QUEUE_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/random.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/random.h
^
|
@@ -1,36 +1,21 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_RANDOM_H
#define __ELL_RANDOM_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
bool l_getrandom(void *buf, size_t len);
bool l_getrandom_is_supported(void);
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ringbuf.c
^
|
@@ -1,24 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2015 Intel Corporation. All rights reserved.
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -45,7 +29,7 @@
/**
* l_ringbuf:
*
- * Opague object representing the Ring Buffer.
+ * Opaque object representing the Ring Buffer.
*/
struct l_ringbuf {
void *buffer;
@@ -58,7 +42,7 @@
#define RINGBUF_RESET 0
-/* Find last (most siginificant) set bit */
+/* Find last (most significant) set bit */
static inline unsigned int fls(unsigned int x)
{
return x ? sizeof(x) * 8 - __builtin_clz(x) : 0;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/ringbuf.h
^
|
@@ -1,24 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2015 Intel Corporation. All rights reserved.
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_RINGBUF_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/rtnl-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2022 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2022 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
struct l_rtnl_route {
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/rtnl.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -25,12 +10,15 @@
#endif
#define _GNU_SOURCE
+#include <asm/types.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <sys/socket.h>
#include <linux/if.h>
#include <linux/icmpv6.h>
#include <linux/neighbour.h>
#include <linux/if_ether.h>
#include <net/if_arp.h>
-#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/rtnl.h
^
|
@@ -1,36 +1,22 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_RTNL_H
#define __ELL_RTNL_H
#include <stdint.h>
-#include <linux/rtnetlink.h>
#include <ell/cleanup.h>
#ifdef __cplusplus
extern "C" {
#endif
+struct rtmsg;
+struct ifaddrmsg;
struct l_rtnl_address;
struct l_rtnl_route;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/settings.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/settings.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_SETTINGS_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/signal.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -48,7 +33,7 @@
/**
* l_signal:
*
- * Opague object representing the signal.
+ * Opaque object representing the signal.
*/
struct l_signal {
struct signal_desc *desc;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/signal.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_SIGNAL_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/siphash-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include <string.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/siphash.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/string.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -41,7 +26,7 @@
/**
* l_string:
*
- * Opague object representing the string buffer.
+ * Opaque object representing the string buffer.
*/
struct l_string {
size_t max;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/string.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_STRING_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/strv.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -205,7 +190,7 @@
/**
* l_strv_new:
*
- * Returns: new emptry string array
+ * Returns: new empty string array
**/
LIB_EXPORT char **l_strv_new(void)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/strv.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_STRV_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/sysctl.c
^
|
@@ -1,24 +1,9 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2023 Cruise LLC
*
- * Embedded Linux library
- *
- * Copyright (C) 2022 Intel Corporation. All rights reserved.
- * Copyright (C) 2023 Cruise LLC. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/sysctl.h
^
|
@@ -1,34 +1,20 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2023 Cruise LLC
*
- * Embedded Linux library
- *
- * Copyright (C) 2022 Intel Corporation. All rights reserved.
- * Copyright (C) 2023 Cruise LLC. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
-#pragma once
+#ifndef __ELL_SYSCTL_H
+#define __ELL_SYSCTL_H
+
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdint.h>
-
int l_sysctl_get_u32(uint32_t *out_v, const char *format, ...)
__attribute__((format(printf, 2, 3)));
int l_sysctl_set_u32(uint32_t v, const char *format, ...)
@@ -37,3 +23,5 @@
#ifdef __cplusplus
}
#endif
+
+#endif /* __ELL_SYSCTL_H */
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/test.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/test.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_TEST_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/tester.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2021 Intel Corporation
*
- * Embedded library
- *
- * Copyright (C) 2021 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/tester.h
^
|
@@ -1,36 +1,21 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2021 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2021 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_TESTER_H
#define __ELL_TESTER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct l_tester;
enum l_tester_stage {
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/time-private.h
^
|
@@ -1,25 +1,12 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
+
struct timeval;
+
uint64_t _time_pick_interval_secs(uint32_t min_secs, uint32_t max_secs);
uint64_t _time_fuzz_msecs(uint64_t ms);
uint64_t _time_fuzz_secs(uint32_t secs, uint32_t max_offset);
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/time.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/time.h
^
|
@@ -1,35 +1,20 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_TIME_H
#define __ELL_TIME_H
+#include <stdint.h>
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdint.h>
-#include <stdbool.h>
-
#define L_USEC_PER_SEC 1000000ULL
#define L_MSEC_PER_SEC 1000ULL
#define L_USEC_PER_MSEC 1000ULL
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/timeout.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -49,7 +34,7 @@
/**
* l_timeout:
*
- * Opague object representing the timeout.
+ * Opaque object representing the timeout.
*/
struct l_timeout {
int fd;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/timeout.h
^
|
@@ -1,34 +1,19 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_TIMEOUT_H
#define __ELL_TIMEOUT_H
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdint.h>
-
struct l_timeout;
typedef void (*l_timeout_notify_cb_t) (struct l_timeout *timeout,
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/tls-extensions.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -968,7 +955,7 @@
/*
* The normal policy otherwise is that the extension must be
- * present in renegotation if the previous Client or Server Hello
+ * present in renegotiation if the previous Client or Server Hello
* did include this extension, or the SCSV in the Client Hello case.
*/
return !tls->ready || !tls->renegotiation_info.secure_renegotiation;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/tls-private.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#define TLS_MAX_VERSION L_TLS_V12
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/tls-record.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/tls-suites.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/tls.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -1324,7 +1311,7 @@
* Note: could handle NULL client_write with non-NULL
* server_handle or server_handle_absent as "server-oriented"
* extension (7.4.1.4) and write empty extension_data and
- * simliarly require empty extension_data in
+ * similarly require empty extension_data in
* tls_handle_client_hello if client_handle NULL.
*/
if (!ext_write)
@@ -3312,7 +3299,7 @@
*
* * (RSA key exchange algorithm case) the correct
* receival of this Finished message confirms the
- * posession of the master secret, it is verified by
+ * possession of the master secret, it is verified by
* both the successful decryption and the MAC of this
* message (either should be enough) because we entered
* the TLS_HANDSHAKE_WAIT_FINISHED state only after
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/tls.h
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_TLS_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/uintset.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015-2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015-2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/uintset.h
^
|
@@ -1,37 +1,22 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015-2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015-2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_UINTSET_H
#define __ELL_UINTSET_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <ell/cleanup.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef void (*l_uintset_foreach_func_t) (uint32_t number, void *user_data);
struct l_uintset;
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/useful.h
^
|
@@ -1,35 +1,22 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2021 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2021 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
-#include <unistd.h>
-#include <errno.h>
-
-#include <ell/util.h>
-
#define align_len(len, boundary) (((len)+(boundary)-1) & ~((boundary)-1))
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
+#define SWAP(l, r) \
+ do { typeof(l) __tmp = (l); (l) = (r); (r) = __tmp; } while (0)
+
+#ifndef __always_inline
+#define __always_inline inline __attribute__((always_inline))
+#endif
+
static inline size_t minsize(size_t a, size_t b)
{
if (a <= b)
@@ -72,20 +59,10 @@
_x / _d; \
})
-#define __AUTODESTRUCT(func) \
- __attribute((cleanup(func ## _cleanup)))
-
+#ifndef _auto_
#define _auto_(func) \
- __AUTODESTRUCT(func)
-
-/* Enables declaring _auto_(close) int fd = <-1 or L_TFR(open(...))>; */
-inline __attribute__((always_inline)) void close_cleanup(void *p)
-{
- int fd = *(int *) p;
-
- if (fd >= 0)
- L_TFR(close(fd));
-}
+ __L_AUTODESTRUCT(func)
+#endif
/*
* Trick the compiler into thinking that var might be changed somehow by
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/utf8.c
^
|
@@ -1,23 +1,9 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
+ * Copyright (C) 2024 Cruise, LLC
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -57,6 +43,70 @@
[0x80 ... 0xFF] = 0,
};
+/**
+ * l_ascii_strdown
+ * @str: a pointer to an ASCII string
+ * @len: maximum bytes to process or negative if string is null terminated
+ *
+ * Returns: Newly allocated string with all upper case characters converted
+ * to lower case.
+ **/
+LIB_EXPORT char *l_ascii_strdown(const char *str, ssize_t len)
+{
+ size_t slen;
+ size_t i;
+ char *ret;
+
+ if (!str)
+ return NULL;
+
+ if (len < 0)
+ slen = strlen(str);
+ else
+ slen = minsize(strlen(str), (size_t) len);
+
+ ret = l_malloc(slen + 1);
+
+ for (i = 0; i < slen; i++)
+ ret[i] = l_ascii_tolower(str[i]);
+
+ ret[i] = '\0';
+
+ return ret;
+}
+
+/**
+ * l_ascii_strup
+ * @str: a pointer to an ASCII string
+ * @len: maximum bytes to process or negative if string is null terminated
+ *
+ * Returns: Newly allocated string with all lower case characters converted
+ * to upper case.
+ **/
+LIB_EXPORT char *l_ascii_strup(const char *str, ssize_t len)
+{
+ size_t slen;
+ size_t i;
+ char *ret;
+
+ if (!str)
+ return NULL;
+
+ if (len < 0)
+ slen = strlen(str);
+ else
+ slen = minsize(strlen(str), (size_t) len);
+
+ ret = l_malloc(slen + 1);
+
+ for (i = 0; i < slen; i++)
+ ret[i] = l_ascii_toupper(str[i]);
+
+ ret[i] = '\0';
+
+ return ret;
+}
+
static inline bool __attribute__ ((always_inline))
valid_unicode(wchar_t c)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/utf8.h
^
|
@@ -1,23 +1,9 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
+ * Copyright (C) 2024 Cruise, LLC
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_UTF8_H
@@ -101,6 +87,25 @@
return false;
}
+static inline __attribute__ ((always_inline)) char l_ascii_toupper(char c)
+{
+ if (!l_ascii_islower(c))
+ return c;
+
+ return c - 32;
+}
+
+static inline __attribute__ ((always_inline)) char l_ascii_tolower(char c)
+{
+ if (!l_ascii_isupper(c))
+ return c;
+
+ return c + 32;
+}
+
+char *l_ascii_strdown(const char *str, ssize_t len);
+char *l_ascii_strup(const char *str, ssize_t len);
+
bool l_utf8_validate(const char *src, size_t len, const char **end);
size_t l_utf8_strlen(const char *str);
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/util.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -142,7 +127,7 @@
* l_strdup:
* @str: string pointer
*
- * Allocates and duplicates sring
+ * Allocates and duplicates string
*
* Returns: a newly allocated string
**/
@@ -168,7 +153,7 @@
* @str: string pointer
* @max: Maximum number of characters to copy
*
- * Allocates and duplicates sring. If the string is longer than @max
+ * Allocates and duplicates string. If the string is longer than @max
* characters, only @max are copied and a null terminating character
* is added.
*
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/util.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_UTIL_H
@@ -29,6 +14,8 @@
#include <inttypes.h>
#include <endian.h>
#include <byteswap.h>
+#include <unistd.h>
+#include <errno.h>
#include <sys/uio.h>
#include <ell/cleanup.h>
@@ -267,6 +254,26 @@
__p; \
}))
+/**
+ * l_newa:
+ * @type: type of structure
+ * @count: amount of structures
+ *
+ * Allocates stack space for @count structures of @type. Memory is allocated
+ * using alloca and initialized to 0.
+ *
+ * Returns: Pointer to memory allocated on the stack.
+ */
+#define l_newa(type, count) \
+ (type *) (__extension__ ({ \
+ size_t __n = (size_t) (count); \
+ size_t __s = sizeof(type); \
+ void *__p; \
+ __p = alloca(__n * __s); \
+ memset(__p, 0, __n * __s); \
+ __p; \
+ }))
+
char *l_strdup(const char *str);
char *l_strndup(const char *str, size_t max);
char *l_strdup_printf(const char *format, ...)
@@ -309,6 +316,15 @@
while (__result == -1L && errno == EINTR); \
__result; }))
+/* Enables declaring _auto_(close) int fd = <-1 or L_TFR(open(...))>; */
+inline __attribute__((always_inline)) void _l_close_cleanup(void *p)
+{
+ int fd = *(int *) p;
+
+ if (fd >= 0)
+ L_TFR(close(fd));
+}
+
#define _L_IN_SET_CMP(val, type, cmp, ...) __extension__ ({ \
const type __v = (val); \
const typeof(__v) __elems[] = {__VA_ARGS__}; \
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/uuid.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/ell/uuid.h
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef __ELL_UUID_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/acd-client.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/dbus-client.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2016 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2016 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/dbus-service.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/dhcp-client.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/dhcp-server.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/dhcp6-client.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -27,6 +12,7 @@
#define _GNU_SOURCE
#include <stdio.h>
#include <signal.h>
+#include <sys/socket.h>
#include <linux/if_arp.h>
#include <arpa/inet.h>
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/glib-eventloop.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2017 Intel Corporation
*
- * Copyright (C) 2017 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/https-client-test.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/https-server-test.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/examples/netconfig-test.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2022 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2022 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/tools/certchain-verify.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/tools/genl-discover.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/tools/genl-request.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/tools/genl-watch.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/tools/gpio.c
^
|
@@ -1,21 +1,8 @@
/*
- * Embedded Linux library
+ * Embedded Linux library
+ * Copyright (C) 2019 Geanix
*
- * Copyright (C) 2019 Geanix. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/gencerts.cnf
^
|
@@ -11,12 +11,10 @@
[ int_ext ]
basicConstraints = CA:TRUE
subjectKeyIdentifier = hash
-authorityKeyIdentifier = keyid:always,issuer:always
[ cert_ext ]
basicConstraints = CA:FALSE
subjectKeyIdentifier = hash
-authorityKeyIdentifier = keyid:always,issuer:always
[ server_ext ]
basicConstraints = CA:FALSE
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-base64.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-checksum.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-cipher.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dbus-message-fds.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2016 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2016 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dbus-message.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dbus-properties.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dbus-service.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dbus-util.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dbus-watch.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dbus.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dhcp.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dhcp6.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2020 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2020 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-dir-watch.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2017 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2017 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-ecc.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -374,28 +359,28 @@
static struct compressed_point_data compressed_tests[] = {
{
- /* BIT1, subtraction performed */
+ /* BIT0, computed Y is odd, subtraction performed */
.x = "19b3fec1c000a888ee9c44272e4d7317e6e36577fc9d53e1edfb4e296b0b7ce1",
.exp_y = "a8f9efd0ab526cd930870779621f4e9a53d4e78887ac9f4ed45ff75ded32b158",
- .type = L_ECC_POINT_TYPE_COMPRESSED_BIT1,
+ .type = L_ECC_POINT_TYPE_COMPRESSED_BIT0,
},
{
- /* BIT1, no subtraction */
+ /* BIT0, computed Y is even, no subtraction */
.x = "958df5997362a9695ad73938c86be34a4730da877eccaaf8b189e73ff20e67c3",
.exp_y = "1042f37262ded34d8424c1728a1ed23a726645b71db30a38f2932001a2027f46",
- .type = L_ECC_POINT_TYPE_COMPRESSED_BIT1,
+ .type = L_ECC_POINT_TYPE_COMPRESSED_BIT0,
},
{
- /* BIT0, subtraction performed */
+ /* BIT1, computed Y is even, subtraction performed */
.x = "069bd56634454ca76e7ba434244137509141cbbf532586c6b36e9b5be8a2cc34",
.exp_y = "f4f34d46e4bdc1473fec4b4c8724f349375a8a602f5e83c260d6724e64ec7e99",
- .type = L_ECC_POINT_TYPE_COMPRESSED_BIT0,
+ .type = L_ECC_POINT_TYPE_COMPRESSED_BIT1,
},
{
- /* BIT0, no subtraction */
+ /* BIT1, computed Y is odd, no subtraction */
.x = "8cade296a68e0c40bcf45a049f1993263bdc8524825e2be44b14ce114e475df0",
.exp_y = "94ed7d09b2a0e95d8df993eaf81eb64d5ff734d01da57e53b2e0277199bc5897",
- .type = L_ECC_POINT_TYPE_COMPRESSED_BIT0,
+ .type = L_ECC_POINT_TYPE_COMPRESSED_BIT1,
},
};
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-ecdh.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2018 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2018 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-endian.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-genl-msg.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-gvariant-message.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-gvariant-util.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-hashmap.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-hwdb.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-io.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-key.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2016 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2016 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-main.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Added |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-minheap.c
^
|
@@ -0,0 +1,155 @@
+/*
+ * Embedded Linux library
+ * Copyright (C) 2023 Cruise LLC
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include <ell/ell.h>
+#include "ell/useful.h"
+
+static inline void swap_int(void *l, void *r)
+{
+ int *li = l;
+ int *ri = r;
+
+ SWAP(*li, *ri);
+}
+
+static inline bool less(const void *l, const void *r)
+{
+ const int *li = l;
+ const int *ri = r;
+
+ return *li < *ri;
+}
+
+static const struct l_minheap_ops ops = {
+ .less = less,
+ .swap = swap_int,
+ .elem_size = sizeof(int),
+};
+
+static const int test_values[] = {
+ 3, 1, 2, 4, INT_MAX, INT_MIN, -4, -2, -1, -3, 0, INT_MIN, INT_MAX
+};
+
+static void verify_pop(struct l_minheap *minheap)
+{
+ size_t size = minheap->used;
+ int *values = minheap->data;
+ int last;
+
+ last = values[0];
+ while (size) {
+ assert(last <= values[0]);
+ last = values[0];
+ assert(l_minheap_pop(minheap, &ops, NULL));
+ size -= 1;
+ }
+}
+
+static void test_minheap_init(const void *data)
+{
+ struct l_minheap minheap;
+ int *values = alloca(sizeof(test_values));
+
+ memcpy(values, test_values, sizeof(test_values));
+
+ l_minheap_init(&minheap, values, L_ARRAY_SIZE(test_values),
+ L_ARRAY_SIZE(test_values), &ops);
+
+ verify_pop(&minheap);
+}
+
+static void test_minheap_push(const void *data)
+{
+ struct l_minheap minheap;
+ int *values = l_newa(int, L_ARRAY_SIZE(test_values));
+ unsigned int i;
+
+ l_minheap_init(&minheap, values, 0, L_ARRAY_SIZE(test_values), &ops);
+
+ for (i = 0; i < L_ARRAY_SIZE(test_values); i++)
+ assert(l_minheap_push(&minheap, &ops, &test_values[i]));
+
+ verify_pop(&minheap);
+}
+
+static void test_minheap_push_random(const void *data)
+{
+ struct l_minheap minheap;
+ unsigned int n_items = 1024 * 1024;
+ int *values = l_malloc(sizeof(int) * n_items);
+ unsigned int i;
+
+ l_minheap_init(&minheap, values, 0, n_items, &ops);
+
+ for (i = 0; i < n_items; i++) {
+ unsigned int r = random();
+
+ assert(l_minheap_push(&minheap, &ops, &r));
+ }
+
+ verify_pop(&minheap);
+ l_free(values);
+}
+
+static void test_minheap_pop_push(const void *data)
+{
+ struct l_minheap minheap;
+ int *values = alloca(sizeof(test_values));
+ unsigned int i;
+ int tmp;
+
+ for (i = 0; i < L_ARRAY_SIZE(test_values); i++)
+ values[i] = INT_MIN;
+
+ l_minheap_init(&minheap, values, L_ARRAY_SIZE(test_values),
+ L_ARRAY_SIZE(test_values), &ops);
+
+ for (i = 0; i < L_ARRAY_SIZE(test_values); i++) {
+ tmp = test_values[i];
+
+ assert(l_minheap_pop_push(&minheap, &ops, &tmp));
+ assert(tmp == INT_MIN);
+ }
+
+ verify_pop(&minheap);
+}
+
+static void test_minheap_delete(const void *data)
+{
+ struct l_minheap minheap;
+ int *values = l_newa(int, L_ARRAY_SIZE(test_values));
+ unsigned int i;
+
+ for (i = 0; i < L_ARRAY_SIZE(test_values); i++) {
+ l_minheap_init(&minheap, values, L_ARRAY_SIZE(test_values),
+ L_ARRAY_SIZE(test_values), &ops);
+ assert(l_minheap_delete(&minheap, i, &ops));
+ verify_pop(&minheap);
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ l_test_init(&argc, &argv);
+
+ l_test_add("minheap/init", test_minheap_init, NULL);
+ l_test_add("minheap/push", test_minheap_push, NULL);
+ l_test_add("minheap/push_random", test_minheap_push_random, NULL);
+ l_test_add("minheap/pop_push", test_minheap_pop_push, NULL);
+ l_test_add("minheap/delete", test_minheap_delete, NULL);
+
+ return l_test_run();
+}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-net.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-netlink.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-path.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-pbkdf2.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2017 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2017 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-pem.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-queue.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-random.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-ringbuf.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-rtnl.c
^
|
@@ -1,24 +1,9 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
+ * Copyright (C) 2020 Daniel Wagner <dwagner@suse.de>
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- * Copyright (C) 2020 Daniel Wagner <dwagner@suse.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -31,6 +16,10 @@
#include <stdlib.h>
#include <signal.h>
#include <sys/wait.h>
+#include <asm/types.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <sys/socket.h>
#include <ell/ell.h>
#include "ell/dbus-private.h"
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-settings.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-siphash.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-string.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-sysctl.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2023 Cruise LLC
*
- * Embedded Linux library
- *
- * Copyright (C) 2023 Cruise LLC. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-time.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-tls.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-uintset.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015-2019 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015-2019 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-unit.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-utf8.c
^
|
@@ -1,23 +1,9 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2014 Intel Corporation
+ * Copyright (C) 2024 Cruise, LLC
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
@@ -934,6 +920,64 @@
l_free(utf16);
}
+static void test_ascii_toupper(const void *data)
+{
+ assert(l_ascii_toupper('c') == 'C');
+ assert(l_ascii_toupper('z') == 'Z');
+ assert(l_ascii_toupper('a') == 'A');
+ assert(l_ascii_toupper('A') == 'A');
+ assert(l_ascii_toupper('Z') == 'Z');
+ assert(l_ascii_toupper(' ') == ' ');
+ assert(l_ascii_toupper('0') == '0');
+ assert(l_ascii_toupper('9') == '9');
+}
+
+static void test_ascii_tolower(const void *data)
+{
+ assert(l_ascii_tolower('c') == 'c');
+ assert(l_ascii_tolower('z') == 'z');
+ assert(l_ascii_tolower('a') == 'a');
+ assert(l_ascii_tolower('A') == 'a');
+ assert(l_ascii_tolower('Z') == 'z');
+ assert(l_ascii_tolower(' ') == ' ');
+ assert(l_ascii_tolower('0') == '0');
+ assert(l_ascii_tolower('9') == '9');
+}
+
+static void test_ascii_strup(const void *data)
+{
+ char *str;
+
+ str = l_ascii_strup("1234abcdefz.09\t\nSUV", -1);
+ assert(!strcmp(str, "1234ABCDEFZ.09\t\nSUV"));
+ l_free(str);
+
+ str = l_ascii_strup("aBCDEF", 10);
+ assert(!strcmp(str, "ABCDEF"));
+ l_free(str);
+
+ str = l_ascii_strup("1234abcdefz.09", 12);
+ assert(!strcmp(str, "1234ABCDEFZ."));
+ l_free(str);
+}
+
+static void test_ascii_strdown(const void *data)
+{
+ char *str;
+
+ str = l_ascii_strdown("1234ABCDEFZ.09\t\nSUV", -1);
+ assert(!strcmp(str, "1234abcdefz.09\t\nsuv"));
+ l_free(str);
+
+ str = l_ascii_strdown("aBCDEF", 10);
+ assert(!strcmp(str, "abcdef"));
+ l_free(str);
+
+ str = l_ascii_strdown("1234abCDEFZ.09", 12);
+ assert(!strcmp(str, "1234abcdefz."));
+ l_free(str);
+}
+
int main(int argc, char *argv[])
{
l_test_init(&argc, &argv);
@@ -1116,5 +1160,10 @@
l_test_add("utf8_to_utf16 2", test_utf8_to_utf16,
&utf8_from_utf16_test2);
+ l_test_add("ascii/toupper", test_ascii_toupper, NULL);
+ l_test_add("ascii/tolower", test_ascii_tolower, NULL);
+ l_test_add("ascii/strup", test_ascii_strup, NULL);
+ l_test_add("ascii/strdown", test_ascii_strdown, NULL);
+
return l_test_run();
}
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-util.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2011-2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2011-2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|
[-]
[+]
|
Changed |
_service:tar_git:ell-0.62.0+git1.tar.bz2/upstream/unit/test-uuid.c
^
|
@@ -1,23 +1,8 @@
/*
+ * Embedded Linux library
+ * Copyright (C) 2015 Intel Corporation
*
- * Embedded Linux library
- *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifdef HAVE_CONFIG_H
|