[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[port139ml:02487] Re: MonyoLog Project



りょうわ です。おはようございます。
#意味なし、なんてそんなとんでもないです〜 ;_; 。

On Fri, 28 Feb 2003 03:48:38 +0900
TAKAHASHI Motonobu <monyo@xxxxxxxxxxxxxx> wrote:

> ここまで作ったものを monyolog version 0.2 としておいてみました。
> 
> http://damedame.monyo.com/?date=20030228#p05
すばらしい (^^)// 拍手。

えっと、ICMP type のとこですが、subtype もあったほうがよいかと思いまして、
こんな感じでしょうか。

DecodeIPHdr.c
54,55c54,55
<       printf (" [%s(%d) ->", DottedDecimal(pIpHdr->sourceIPAddress), pIcmpHdr->i_type);
<       printf ("%s(%d)]", DottedDecimal(pIpHdr->destIPAddress), pIcmpHdr->i_type);
---
>       printf (" [%s(%d:%d) ->", DottedDecimal(pIpHdr->sourceIPAddress), pIcmpHdr->i_type, pIcmpHdr->i_code);
>       printf ("%s]", DottedDecimal(pIpHdr->destIPAddress));

あと、タイムスタンプに日付も入れると、こんな感じでしょか。
iplog.c
13a14,17
>       time_t timer;
>       struct tm *date;
>       char ltime[20];
>
88,89c92,94
<                       char ltime[9];
<                       _strtime (ltime);
---
>                       timer = time(NULL);
>                       date = localtime(&timer);
>                       strftime(ltime, 20, "%Y-%m-%d %H:%M:%S", date);

-- 
Akira Ryowa <ryowa@xxxxxxxxxx>