]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/address: constify ipv6 cmp funcs
authorVictor Julien <vjulien@oisf.net>
Tue, 9 Jan 2024 20:53:35 +0000 (21:53 +0100)
committerVictor Julien <vjulien@oisf.net>
Fri, 28 Jun 2024 07:44:28 +0000 (09:44 +0200)
src/detect-engine-address-ipv6.c
src/detect-engine-address-ipv6.h

index 4728662e0a75ab01cf556ce41723aefe4bcb0947..489bf99925b6ba72e6d068560713a6b0f128b169 100644 (file)
@@ -49,7 +49,7 @@
  * \retval 1 If a < b.
  * \retval 0 Otherwise, i.e. a >= b.
  */
-int AddressIPv6Lt(Address *a, Address *b)
+int AddressIPv6Lt(const Address *a, const Address *b)
 {
     int i = 0;
 
@@ -87,7 +87,7 @@ int AddressIPv6LtU32(uint32_t *a, uint32_t *b)
  * \retval 1 If a > b.
  * \retval 0 Otherwise, i.e. a <= b.
  */
-int AddressIPv6Gt(Address *a, Address *b)
+int AddressIPv6Gt(const Address *a, const Address *b)
 {
     int i = 0;
 
@@ -125,7 +125,7 @@ int AddressIPv6GtU32(uint32_t *a, uint32_t *b)
  * \retval 1 If a == b.
  * \retval 0 Otherwise.
  */
-int AddressIPv6Eq(Address *a, Address *b)
+int AddressIPv6Eq(const Address *a, const Address *b)
 {
     int i = 0;
 
@@ -159,7 +159,7 @@ int AddressIPv6EqU32(uint32_t *a, uint32_t *b)
  * \retval 1 If a <= b.
  * \retval 0 Otherwise, i.e. a > b.
  */
-int AddressIPv6Le(Address *a, Address *b)
+int AddressIPv6Le(const Address *a, const Address *b)
 {
 
     if (AddressIPv6Eq(a, b) == 1)
@@ -191,7 +191,7 @@ int AddressIPv6LeU32(uint32_t *a, uint32_t *b)
  * \retval 1 If a >= b.
  * \retval 0 Otherwise, i.e. a < b.
  */
-int AddressIPv6Ge(Address *a, Address *b)
+int AddressIPv6Ge(const Address *a, const Address *b)
 {
 
     if (AddressIPv6Eq(a, b) == 1)
index 96727ee2769197c4f8d107d874cc0a0eafc64983..19fcb0d527128d6969fe9cd678adf0032c8735c3 100644 (file)
 #ifndef SURICATA_DETECT_ENGINE_ADDRESS_IPV6_H
 #define SURICATA_DETECT_ENGINE_ADDRESS_IPV6_H
 
-int AddressIPv6Lt(Address *, Address *);
-int AddressIPv6Gt(Address *, Address *);
-int AddressIPv6Eq(Address *, Address *);
-int AddressIPv6Le(Address *, Address *);
-int AddressIPv6Ge(Address *, Address *);
+int AddressIPv6Lt(const Address *, const Address *);
+int AddressIPv6Gt(const Address *, const Address *);
+int AddressIPv6Eq(const Address *, const Address *);
+int AddressIPv6Le(const Address *, const Address *);
+int AddressIPv6Ge(const Address *, const Address *);
 
 int AddressIPv6LeU32(uint32_t *a, uint32_t *b);
 int AddressIPv6LtU32(uint32_t *a, uint32_t *b);