summaryrefslogtreecommitdiffstats
path: root/ulogd/extensions
diff options
context:
space:
mode:
authorlaforge <laforge>2003-01-13 13:36:26 +0000
committerlaforge <laforge>2003-01-13 13:36:26 +0000
commitf33430f1ab93fd6f9f03d6569ab5f178efb15e82 (patch)
tree5a6d3a0c2864d556e0bf04851131f0fdfd1e61b8 /ulogd/extensions
parent2827589c2b31570e72e49b12db793cf7ce2b6d0b (diff)
add typecasts to (struct in_addr) when calling inet_ntoa()
Diffstat (limited to 'ulogd/extensions')
-rw-r--r--ulogd/extensions/ulogd_LOGEMU.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ulogd/extensions/ulogd_LOGEMU.c b/ulogd/extensions/ulogd_LOGEMU.c
index 24f61d9..7b1f640 100644
--- a/ulogd/extensions/ulogd_LOGEMU.c
+++ b/ulogd/extensions/ulogd_LOGEMU.c
@@ -1,4 +1,4 @@
-/* ulogd_LOGEMU.c, Version $Revision: 1.10 $
+/* ulogd_LOGEMU.c, Version $Revision: 1.11 $
*
* ulogd output target for syslog logging emulation
*
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_LOGEMU.c,v 1.10 2002/12/09 14:42:43 laforge Exp $
+ * $Id: ulogd_LOGEMU.c,v 1.11 2002/12/09 15:03:51 laforge Exp $
*
*/
@@ -143,8 +143,10 @@ int _output_logemu(ulog_iret_t *res)
fprintf(of, "MAC=%s ",
(GET_FLAGS(3) & ULOGD_RETF_VALID) ? (char *) GET_VALUE(3).ptr : "");
- fprintf(of, "SRC=%s ", inet_ntoa(htonl(GET_VALUE(4).ui32)));
- fprintf(of, "DST=%s ", inet_ntoa(htonl(GET_VALUE(5).ui32)));
+ fprintf(of, "SRC=%s ", inet_ntoa((struct in_addr)
+ {htonl(GET_VALUE(4).ui32)}));
+ fprintf(of, "DST=%s ", inet_ntoa((struct in_addr)
+ {htonl(GET_VALUE(5).ui32)}));
fprintf(of, "LEN=%u TOS=%02X PREC=0x%02X TTL=%u ID=%u ",
GET_VALUE(6).ui16, GET_VALUE(7).ui8 & IPTOS_TOS_MASK,
@@ -225,7 +227,7 @@ int _output_logemu(ulog_iret_t *res)
GET_VALUE(31).ui32 >> 24);
break;
case ICMP_REDIRECT:
- fprintf(of, "GATEWAY=%s ", inet_ntoa(htonl(GET_VALUE(31).ui32)));
+ fprintf(of, "GATEWAY=%s ", inet_ntoa((struct in_addr) {htonl(GET_VALUE(31).ui32)}));
break;
case ICMP_DEST_UNREACH:
if (GET_VALUE(28).ui8 == ICMP_FRAG_NEEDED)