]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: constify address match functions
authorVictor Julien <victor@inliniac.net>
Sat, 7 Oct 2017 10:18:20 +0000 (12:18 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 24 Nov 2017 09:14:37 +0000 (10:14 +0100)
src/detect-engine-address.c
src/detect-engine-address.h

index 694a764aca384f5fc362acf85131cab3f15564ed..9700097b3a5f0faec665e10b6e90f0ac1cb14d91 100644 (file)
@@ -1684,7 +1684,8 @@ int DetectAddressCmp(DetectAddress *a, DetectAddress *b)
  *
  *  \todo array should be ordered, so we can break out of the loop
  */
-int DetectAddressMatchIPv4(DetectMatchAddressIPv4 *addrs, uint16_t addrs_cnt, Address *a)
+int DetectAddressMatchIPv4(const DetectMatchAddressIPv4 *addrs,
+        uint16_t addrs_cnt, const Address *a)
 {
     SCEnter();
 
@@ -1718,7 +1719,8 @@ int DetectAddressMatchIPv4(DetectMatchAddressIPv4 *addrs, uint16_t addrs_cnt, Ad
  *
  *  \todo array should be ordered, so we can break out of the loop
  */
-int DetectAddressMatchIPv6(DetectMatchAddressIPv6 *addrs, uint16_t addrs_cnt, Address *a)
+int DetectAddressMatchIPv6(const DetectMatchAddressIPv6 *addrs,
+        uint16_t addrs_cnt, const Address *a)
 {
     SCEnter();
 
index d1944c11545ecc611ca995b27908423f043e3b45..c01b20e6b240bf1a200b22d06c5f5299def9b5d0 100644 (file)
@@ -52,8 +52,8 @@ DetectAddress *DetectAddressCopy(DetectAddress *);
 void DetectAddressPrint(DetectAddress *);
 int DetectAddressCmp(DetectAddress *, DetectAddress *);
 
-int DetectAddressMatchIPv4(DetectMatchAddressIPv4 *, uint16_t, Address *);
-int DetectAddressMatchIPv6(DetectMatchAddressIPv6 *, uint16_t, Address *);
+int DetectAddressMatchIPv4(const DetectMatchAddressIPv4 *, uint16_t, const Address *);
+int DetectAddressMatchIPv6(const DetectMatchAddressIPv6 *, uint16_t, const Address *);
 
 int DetectAddressTestConfVars(void);