]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ioctl: make all string args const pointers
authorVictor Julien <victor@inliniac.net>
Fri, 5 Dec 2014 09:16:48 +0000 (10:16 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 5 Dec 2014 09:16:48 +0000 (10:16 +0100)
src/util-ioctl.c
src/util-ioctl.h

index 28a72f796189b0cd35241b334a8d664df88f17d1..7ea8f22a427f335c237433c9e5a50583019d678b 100644 (file)
@@ -47,7 +47,7 @@
  *
  * \param Name of a network interface
  */
-int GetIfaceMaxHWHeaderLength(char *pcap_dev)
+int GetIfaceMaxHWHeaderLength(const char *pcap_dev)
 {
     if ((!strcmp("eth", pcap_dev))
             ||
@@ -76,7 +76,7 @@ int GetIfaceMaxHWHeaderLength(char *pcap_dev)
  * \param Name of link
  * \retval -1 in case of error, 0 if MTU can not be found
  */
-int GetIfaceMTU(char *pcap_dev)
+int GetIfaceMTU(const char *pcap_dev)
 {
 #ifdef SIOCGIFMTU
     struct ifreq ifr;
@@ -115,7 +115,7 @@ int GetIfaceMTU(char *pcap_dev)
  * \param Name of a network interface
  * \retval 0 in case of error
  */
-int GetIfaceMaxPacketSize(char *pcap_dev)
+int GetIfaceMaxPacketSize(const char *pcap_dev)
 {
     int ll_header = GetIfaceMaxHWHeaderLength(pcap_dev);
     int mtu = 0;
@@ -150,7 +150,7 @@ int GetIfaceMaxPacketSize(char *pcap_dev)
  * \param Name of link
  * \retval -1 in case of error, 0 if none, 1 if some
  */
-int GetIfaceOffloading(char *pcap_dev)
+int GetIfaceOffloading(const char *pcap_dev)
 {
 #if defined (ETHTOOL_GGRO) && defined (ETHTOOL_GFLAGS)
     struct ifreq ifr;
index d293a4d0476017896d3500b9d44c82377c692493..3931c1fe0919d4864ec551921fd323958184efbf 100644 (file)
@@ -21,7 +21,7 @@
  * \author Eric Leblond <eleblond@edenwall.com>
  */
 
-int GetIfaceMTU(char *pcap_dev);
-int GetIfaceMaxPacketSize(char *pcap_dev);
-int GetIfaceOffloading(char *pcap_dev);
+int GetIfaceMTU(const char *pcap_dev);
+int GetIfaceMaxPacketSize(const char *pcap_dev);
+int GetIfaceOffloading(const char *pcap_dev);
 int GetIfaceRSSQueuesNum(const char *pcap_dev);