[PATCH 01/13] net: Rename l_net_subnet_matches to l_net_prefix_matches
by Andrew Zaborowski
---
ell/net.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/net.h b/ell/net.h
index eaaf14c..0521d75 100644
--- a/ell/net.h
+++ b/ell/net.h
@@ -41,7 +41,7 @@ bool l_net_hostname_is_localhost(const char *hostname);
bool l_net_get_address(int ifindex, struct in_addr *out);
bool l_net_get_link_local_address(int ifindex, struct in6_addr *out);
-static inline bool l_net_subnet_matches(const void *a, const void *b,
+static inline bool l_net_prefix_matches(const void *a, const void *b,
uint8_t prefix_len)
{
uint8_t bytes = prefix_len / 8;
--
2.32.0
1 month, 4 weeks
Free Cell Phone Ringtones For Your Cell Phone
by andrew551008@gmail.com
You can make free cell phone ringtones for your cell phone by downloading music from your CD collection. You can legally rip the music from CDs and then edit it to convert it to a ringtone. You can then upload it to a service that provides editing software or use free software to do the editing yourself. To get started, you need to download the software and follow the instructions on the screen.
To delete a ringtone, you need to go to the website and unsubscribe from the service. Blocking Internet access will not stop the downloads or monthly charges. You must also follow the cancellation instructions which are usually printed on the web site. In most cases, you can text STOP to stop receiving these cellular phone ringtones. If you're unhappy with the ringtone, you can always send a request to the service and ask them to remove it.
Besides downloading ringtones for free, you can also customize the themes, menu icons, background, and even games on your cell phone. If you're looking for something a little different, you can try video game ringtones. As communication technology advances, there's sure to be a market for cell phone accessories. In the meantime, you can find many sites that offer a wide variety of free cell phone 'ringtones' to download.
2 months
[PATCH 01/12] net: Rename l_net_subnet_matches to l_net_prefix_matches
by Andrew Zaborowski
---
ell/net.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/net.h b/ell/net.h
index eaaf14c..0521d75 100644
--- a/ell/net.h
+++ b/ell/net.h
@@ -41,7 +41,7 @@ bool l_net_hostname_is_localhost(const char *hostname);
bool l_net_get_address(int ifindex, struct in_addr *out);
bool l_net_get_link_local_address(int ifindex, struct in6_addr *out);
-static inline bool l_net_subnet_matches(const void *a, const void *b,
+static inline bool l_net_prefix_matches(const void *a, const void *b,
uint8_t prefix_len)
{
uint8_t bytes = prefix_len / 8;
--
2.32.0
2 months
[PATCH 01/11] net: Add l_net_subnet_matches
by Andrew Zaborowski
Add inline function to check if two IP addresses are in the same subnet.
---
ell/net.h | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/ell/net.h b/ell/net.h
index c97d9c9..837209c 100644
--- a/ell/net.h
+++ b/ell/net.h
@@ -25,6 +25,7 @@
#include <stdbool.h>
#include <stdint.h>
+#include <string.h>
struct in_addr;
struct in6_addr;
@@ -40,6 +41,26 @@ bool l_net_hostname_is_localhost(const char *hostname);
bool l_net_get_address(int ifindex, struct in_addr *out);
bool l_net_get_link_local_address(int ifindex, struct in6_addr *out);
+static inline bool l_net_subnet_matches(const void *a, const void *b,
+ uint8_t prefix_len)
+{
+ uint8_t bytes = prefix_len / 8;
+ uint8_t bits = prefix_len & 7;
+
+ /*
+ * @a and @b are network byte order IPv4 or IPv6 addresses.
+ * We want to check if the initial (top) @prefix_len bits match.
+ * memcmp the whole bytes, then compare the final byte's top
+ * bits by anding with a mask.
+ */
+ if (bytes && memcmp(a, b, bytes))
+ return false;
+
+ return !bits ||
+ ((((const uint8_t *) a)[bytes] ^ ((const uint8_t *) b)[bytes]) &
+ (0xff00u >> bits)) == 0;
+}
+
#ifdef __cplusplus
}
#endif
--
2.32.0
2 months
[PATCH 01/11] net: Rename l_net_subnet_matches to l_net_prefix_matches
by Andrew Zaborowski
---
ell/net.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/net.h b/ell/net.h
index eaaf14c..0521d75 100644
--- a/ell/net.h
+++ b/ell/net.h
@@ -41,7 +41,7 @@ bool l_net_hostname_is_localhost(const char *hostname);
bool l_net_get_address(int ifindex, struct in_addr *out);
bool l_net_get_link_local_address(int ifindex, struct in6_addr *out);
-static inline bool l_net_subnet_matches(const void *a, const void *b,
+static inline bool l_net_prefix_matches(const void *a, const void *b,
uint8_t prefix_len)
{
uint8_t bytes = prefix_len / 8;
--
2.32.0
2 months
How to Find Free Ringtones For Mobile
by tonosparacelular.net@gmail.com
When searching for new ringtones for your mobile phone, you can download music mp3 files for free. TheRingtoneSite is a popular site where you can search for ringtones that are suitable for your phone and download them. This program allows you to find music files that match your style and preferences, and is compatible with Android and Windows Phone devices. Its menu build-up is very convenient, and it includes a column for the most recent downloadable jingles. https://tonosparacelular.net/
If you want to download a ringtone for your phone that you can use on any device, there are several different websites to choose from. The Yankee Group, for example, surveyed 18 percent of mobile phone users to find the best selection. The two age groups that were shown the greatest interest in ringtones were young adults (1824) and teens (1117). According to a study published by the NPD Group, teens aged thirteen to seventeen years old have cut back on clothing spending by 10 percent to pay for the latest electronics.
There are many ways to find a ringtone. You can search for ringtones online for free and search for the song you want. Some of the websites will allow you to preview the song before downloading it. You don't need to register or sign up for an account to hear a sample. In just a few seconds, the mp3 file will be downloaded. Although some websites are free, some of them may not be legal and might contain copyrighted music.
One of the most popular ringtone sites has over half a million mp3 files. It lets you browse the list by genre and popularity. You can send a MP3 file to anyone you want or save a ringtone as an attachment. Besides, the site allows you to upload multiple mp3 files at one time. You can also customize ringtones by adding a name to them.
You can also choose to download ringtones for mobile. Many websites have downloadable mp3 files that you can use as a ringtone on your cell phone. Using an MP3 file as your cellular phone's earring is a great option for ringtones for mobile. They can be downloaded for free and can be played from any location. These mp3 files are easy to navigate, and you can download them on your phone for free if you want.
Another popular site offers a large selection of mp3 ringtones. You can also use your own recordings. You can choose from a wide range of genres and styles and download as many as you need for your mobile phone. Aside from music, you can also find ringtones for phones that are compatible with your phone. If you prefer a more personalized ringtone, you can choose your favorite mp3 files for your mobile phone.
2 months, 1 week
[PATCH 1/8] dhcp6-lease: Make getters argument const, cleanup
by Andrew Zaborowski
Add "const" to the lifetime getters argument, drop dhcp6-private.h
declarations I probably added/renamed by mistake.
---
ell/dhcp6-lease.c | 13 +++++++------
ell/dhcp6-private.h | 7 ++-----
ell/dhcp6.h | 7 ++++---
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/ell/dhcp6-lease.c b/ell/dhcp6-lease.c
index 6109af1..978176a 100644
--- a/ell/dhcp6-lease.c
+++ b/ell/dhcp6-lease.c
@@ -373,7 +373,7 @@ LIB_EXPORT uint8_t l_dhcp6_lease_get_prefix_length(
}
#define PICK_IA() \
- struct dhcp6_ia *ia; \
+ const struct dhcp6_ia *ia; \
\
if (lease->have_na) \
ia = &lease->ia_na; \
@@ -382,7 +382,7 @@ LIB_EXPORT uint8_t l_dhcp6_lease_get_prefix_length(
else \
return 0 \
-uint32_t _dhcp6_lease_get_t1(struct l_dhcp6_lease *lease)
+uint32_t _dhcp6_lease_get_t1(const struct l_dhcp6_lease *lease)
{
PICK_IA();
@@ -395,7 +395,7 @@ uint32_t _dhcp6_lease_get_t1(struct l_dhcp6_lease *lease)
return ia->info.valid_lifetime / 2;
}
-uint32_t _dhcp6_lease_get_t2(struct l_dhcp6_lease *lease)
+uint32_t _dhcp6_lease_get_t2(const struct l_dhcp6_lease *lease)
{
PICK_IA();
@@ -409,7 +409,7 @@ uint32_t _dhcp6_lease_get_t2(struct l_dhcp6_lease *lease)
}
LIB_EXPORT uint32_t l_dhcp6_lease_get_valid_lifetime(
- struct l_dhcp6_lease *lease)
+ const struct l_dhcp6_lease *lease)
{
if (unlikely(!lease))
return 0;
@@ -421,7 +421,7 @@ LIB_EXPORT uint32_t l_dhcp6_lease_get_valid_lifetime(
}
LIB_EXPORT uint32_t l_dhcp6_lease_get_preferred_lifetime(
- struct l_dhcp6_lease *lease)
+ const struct l_dhcp6_lease *lease)
{
if (unlikely(!lease))
return 0;
@@ -433,7 +433,8 @@ LIB_EXPORT uint32_t l_dhcp6_lease_get_preferred_lifetime(
}
/* Get the reception timestamp, i.e. when lifetimes are counted from */
-LIB_EXPORT uint64_t l_dhcp6_lease_get_start_time(struct l_dhcp6_lease *lease)
+LIB_EXPORT uint64_t l_dhcp6_lease_get_start_time(
+ const struct l_dhcp6_lease *lease)
{
if (unlikely(!lease))
return 0;
diff --git a/ell/dhcp6-private.h b/ell/dhcp6-private.h
index 52f4002..6b33e34 100644
--- a/ell/dhcp6-private.h
+++ b/ell/dhcp6-private.h
@@ -148,8 +148,5 @@ void _dhcp6_lease_free(struct l_dhcp6_lease *lease);
struct l_dhcp6_lease *_dhcp6_lease_parse_options(
struct dhcp6_option_iter *iter,
const uint8_t expected_iaid[static 4]);
-uint32_t _dhcp6_lease_get_t1(struct l_dhcp6_lease *lease);
-uint32_t _dhcp6_lease_get_t2(struct l_dhcp6_lease *lease);
-uint32_t dhcp6_lease_get_valid_lifetime(struct l_dhcp6_lease *lease);
-uint32_t dhcp6_lease_get_preferred_lifetime(struct l_dhcp6_lease *lease);
-uint32_t dhcp6_lease_get_start_time(struct l_dhcp6_lease *lease);
+uint32_t _dhcp6_lease_get_t1(const struct l_dhcp6_lease *lease);
+uint32_t _dhcp6_lease_get_t2(const struct l_dhcp6_lease *lease);
diff --git a/ell/dhcp6.h b/ell/dhcp6.h
index 9819fad..5086a74 100644
--- a/ell/dhcp6.h
+++ b/ell/dhcp6.h
@@ -94,9 +94,10 @@ char *l_dhcp6_lease_get_address(const struct l_dhcp6_lease *lease);
char **l_dhcp6_lease_get_dns(const struct l_dhcp6_lease *lease);
char **l_dhcp6_lease_get_domains(const struct l_dhcp6_lease *lease);
uint8_t l_dhcp6_lease_get_prefix_length(const struct l_dhcp6_lease *lease);
-uint32_t l_dhcp6_lease_get_valid_lifetime(struct l_dhcp6_lease *lease);
-uint32_t l_dhcp6_lease_get_preferred_lifetime(struct l_dhcp6_lease *lease);
-uint64_t l_dhcp6_lease_get_start_time(struct l_dhcp6_lease *lease);
+uint32_t l_dhcp6_lease_get_valid_lifetime(const struct l_dhcp6_lease *lease);
+uint32_t l_dhcp6_lease_get_preferred_lifetime(
+ const struct l_dhcp6_lease *lease);
+uint64_t l_dhcp6_lease_get_start_time(const struct l_dhcp6_lease *lease);
#ifdef __cplusplus
}
--
2.32.0
2 months, 1 week
[PATCH] configure: Update to support Autoconf >= 2.69
by Ossama Othman
Bootstrapping ELL against Autoconf 2.71 triggers warnings about use of
the deprecated Autoconf macros. Replace use of the deprecated
AC_HELP_STRING and AC_LANG_C macros with AS_HELP_STRING and
AC_LANG([C]), respectively.
Bump the Autoconf prerequisite, accordingly, to support the updated
macros, from 2.60 to 2.69. Only require Autoconf 2.69 as a
prerequisite since many Linux distributions do not yet ship with
Autoconf 2.71.
This also addresses a `configure' script generation error on Fedora 36.
---
configure.ac | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9350e14..3bf220b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
-AC_PREREQ(2.60)
-AC_INIT(ell, 0.49)
+AC_PREREQ([2.69])
+AC_INIT([ell],[0.49])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_AUX_DIR(build-aux)
@@ -16,7 +16,7 @@ AC_PREFIX_DEFAULT(/usr/local)
COMPILER_FLAGS
-AC_LANG_C
+AC_LANG([C])
AC_PROG_CC
AC_PROG_CC_PIE
@@ -31,14 +31,14 @@ AC_C_BIGENDIAN(little_endian=no, little_endian=yes, little_endian=no)
LT_PREREQ(2.2)
LT_INIT([disable-static])
-AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
+AC_ARG_ENABLE(optimization, AS_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
if (test "${enableval}" = "no"); then
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -O0"
fi
])
-AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
+AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
[enable compiling with debugging information]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_prog_cc_g}" = "yes"); then
@@ -46,7 +46,7 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
fi
])
-AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
+AC_ARG_ENABLE(pie, AS_HELP_STRING([--enable-pie],
[enable position independent executables flag]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_prog_cc_pie}" = "yes"); then
@@ -59,7 +59,7 @@ save_LIBS=$LIBS
AC_CHECK_LIB(asan, _init)
LIBS=$save_LIBS
-AC_ARG_ENABLE(asan, AC_HELP_STRING([--enable-asan],
+AC_ARG_ENABLE(asan, AS_HELP_STRING([--enable-asan],
[enable linking with address sanitizer]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_lib_asan__init}" = "yes" &&
@@ -73,7 +73,7 @@ save_LIBS=$LIBS
AC_CHECK_LIB(lsan, _init)
LIBS=$save_LIBS
-AC_ARG_ENABLE(lsan, AC_HELP_STRING([--enable-lsan],
+AC_ARG_ENABLE(lsan, AS_HELP_STRING([--enable-lsan],
[enable linking with leak sanitizer]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_lib_lsan__init}" = "yes" &&
@@ -87,7 +87,7 @@ save_LIBS=$LIBS
AC_CHECK_LIB(ubsan, _init)
LIBS=$save_LIBS
-AC_ARG_ENABLE(ubsan, AC_HELP_STRING([--enable-ubsan],
+AC_ARG_ENABLE(ubsan, AS_HELP_STRING([--enable-ubsan],
[enable linking with undefined behavior sanitizer]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_lib_ubsan__init}" = "yes" &&
@@ -111,7 +111,7 @@ AC_CHECK_FUNC(epoll_create, dummy=yes,
AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
-AC_ARG_ENABLE(glib, AC_HELP_STRING([--enable-glib],
+AC_ARG_ENABLE(glib, AS_HELP_STRING([--enable-glib],
[enable ell/glib main loop example]),
[enable_glib=${enableval}])
--
2.32.0
2 months, 2 weeks