summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaforge <laforge>2003-01-13 13:36:26 +0000
committerlaforge <laforge>2003-01-13 13:36:26 +0000
commitdabbc22693087fc89aaf9b7ab8b032e859dee434 (patch)
tree7cfc1486b9d7215e816f01eef8ed759c5ee40179
parente6021aa775747ce649c7bf4ba4211a6d81d19bfe (diff)
add typecasts to (struct in_addr) when calling inet_ntoa()
-rw-r--r--extensions/ulogd_LOGEMU.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/extensions/ulogd_LOGEMU.c b/extensions/ulogd_LOGEMU.c
index 24f61d9..7b1f640 100644
--- a/extensions/ulogd_LOGEMU.c
+++ b/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)