Programmingの最近のブログ記事

I made a patch for periodic packet sampling function for softflowd(http://www.mindrot.org/projects/softflowd/). It's not tested yet.
The diff file is placed in http://web.sfc.wide.ad.jp/~irino/software/softflowd_c_psamp.diff .
久しぶりに、Thunderbirdのwireshark-devのMLのメールを格納してるフォルダでnetflowと検索したら、今更気づいたのですが、今から1ヶ月以上前の11/8に
[Wireshark-dev] Netflow dissector bug-to-be
というメールが流れてて、僕のしょぼいバグで議論されていました。PENはRFC5101では32bit定義なのにuint16_tで宣言してて、かつntohlしてました。
r34802 "The PEN field is 32 bits."で修正されているようです。
あと、svn logを読むとBrianさんたちのFile Format(RFC5655)がサポートされた模様です。
ソースコードを読むとntop/nprobeの独自フィールドがデコードできるようになっているようです。
svn logは以下の通り

twttmixi with oauth

| コメント(0) | トラックバック(0)
「Twitterの呟きをmixi日記に投稿する」のtwttmixiがTwitterのOauth移行後使えてなかったので、直しました。だいぶ適当です。久しぶりにprogrammingした気がしますが、殆どwebに転がっている情報を組み合わせてるだけなのでprogrammingしたといえるのかどうか。

参考:
Net::Twitter
[perl][twitter]Net::TwitterでOAuthしてみるテスト

出来上がったもの:
twttmixi-oauth.pl.txt

PF_RING(&ntop)のmain developerからメールが来た。
「ごめん、2年前の君のメール見落としてた。謝る。で、svnにまだ取り込んでいないので、時間あったら動作チェックしてくれない?」(超意訳)
PF_RINGというのは、Linuxで(Linux標準のTCP/IPスタックを迂回して)パケットキャプチャを速くするカーネルパッチ(最近はカーネルモジュール)
2年前ソースコードにToDo:IPv6と書いてあったので、無理やりIPv6もチェックするパッチを書いた(その時のメールblog)のだが、思いっきりスルーされてて、書いた本人も忘れていた。
それで、久しぶりにPF_RINGのsvnをチェックアウトしたら、既に自分のパッチが取り込まれていた。ソースコードにもちゃんと名前が入っていて嬉しい限り。
c3620の古いIOS 12.3(22)でNetFlowをExportしたらWiresharkのbugに気が付いてしまった。

ubuntuに入ってたWireshark 1.2.2でデコード
c36nfv9_wireshark1_2_2.pngSubversion(revision 31474)のソースコードからbuildしたWiresharkでデコード
c36nfv9_wireshark_r31474.png"no template found"になっているではありませんか。
そもそもScope FieldのLengthが0って良いのか良くわからないが、Cisco実装がこうなっているので仕方ない。
I opened a wireshark bugzilla ticket.
Bug 4365 -  More complete support for IPFIX Information Elements for packet-netflow.c  (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4365)
-
More complete support for IPFIX Information Elements for packet-netflow.c

Build Information:
wireshark 1.3.3 (SVN Rev 31391 from /trunk)

Copyright 1998-2009 Gerald Combs <gerald@wireshark.org> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled with GTK+ 2.12.12, with GLib 2.16.6, with libpcap 0.9.8, with libz
1.2.3.3, without POSIX capabilities, without libpcre, without SMI, without
c-ares, without ADNS, without Lua, without Python, without GnuTLS, without
Gcrypt, without Kerberos, without GeoIP, without PortAudio, without AirPcap,
with new_packet_list.

Running on Linux 2.6.25.20-co-0.8.0, with libpcap version 0.9.8.

Built using gcc 4.3.2.
--
This attached patch enhance the number of supporting standard IPFIX Information
Elements which are defined in
http://www.iana.org/assignments/ipfix/ipfix.xhtml.
I sent a following mail to Vermont-dev mailing list. (The mail is archived in https://lists.berlios.de/mailman/private/vermont-dev/2009-December/000280.html, but an account is required to see the archive.)
-
Hello developers and all,

I downloaded source code via subversion and compile it. The configurability of VERMONT is very good, but the data size of exported IPFIX packets including data records can not be configured. The exported packets always include 10 records.
I made a temporary patch to configure data size of exported packets.
(I understand that the parameter is not described in the destination class in draft-ietf-ipfix-configuration-model-04)

This is a part of my configuration file. I added "maxPacketsize".
        <ipfixExporter id="8">
                <observationDomainId>99</observationDomainId>
                <ipfixPacketRestrictions>
                        <maxPacketSize>1500</maxPacketSize>
                </ipfixPacketRestrictions>

                <collector>
                        <ipAddress>127.0.0.1</ipAddress>
                        <transportProtocol>17</transportProtocol>
                </collector>
        </ipfixExporter>
twitter2mixiというサービスがありますが、なんか使う気が起きませんでした。
元々twttmixiをtwitterからmixi日記に転送していたので、いじればmixiボイスにも転送できるんじゃないかと思ってやってみました。
twttmixiを使ってmixi日記に自動投稿していたのですが、ある時期からtwitterを非公開状態に変えてしまったので、twttmixiが動かなくなってしまって放置してました。

時間があった時に調べてみたところ、どうもBasic認証を要求されてそこで失敗しているようなので、ユーザ認証を要するページにperlでアクセスを参考に修正しました。

83a87
>     $twitter->credentials("$TWITTER_DOMAIN:$HTTP_PORT", $TWITTER_REALM, $TWITTER_USERNAME, $TWITTER_PASSWORD);

修正といっても大したことなく、単に1行追加です。なお、ここで使っている変数は以下の通り設定しています。

my $TWITTER_DOMAIN      = 'twitter.com';
my $HTTP_PORT           = '80';
my $TWITTER_REALM       = 'Twitter API';
my $TWITTER_USERNAME    = ツイッターのユーザネーム;
my $TWITTER_PASSWORD    = ツイッターのパスワード;

ウェブページ

OpenID対応しています OpenIDについて
Powered by Movable Type 5.13-ja

このアーカイブについて

このページには、過去に書かれたブログ記事のうちProgrammingカテゴリに属しているものが含まれています。

前のカテゴリはLinuxです。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。