The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Monday, May 15, 2000

More MONitoring of the NETwork

comment on monnet—odd stuff you see watching the network So I'm still working on monnet. I basically started over from scratch, reworking the code although the basic structure is the same from the old version. The output from the program looks like:

0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.72.81   TCP     25945    80  A    
00C07B4D7D81 0040332E103C IPv4        205.229.72.81   208.26.72.3     TCP        80 25945  AP   
00C07B4D7D81 0040332E103C IPv4        205.229.72.81   208.26.72.3     TCP        80 25945  AP  F
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.72.81   TCP     25945    80  A    
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.74.191  TCP     25944    80  A   F
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.74.190  TCP     25950    80     S 
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.72.81   TCP     25945    80  A   F
00C07B4D7D81 0040332E103C IPv4        205.229.74.218  208.26.72.3     TCP        80 25944    R  
00C07B4D7D81 0040332E103C IPv4        205.229.74.190  208.26.72.3     TCP        80 25950  A  S 
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.74.190  TCP     25950    80  A    
00C07B4D7D81 0040332E103C IPv4        205.229.72.81   208.26.72.3     TCP        80 25945  A    
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.74.190  TCP     25950    80  AP   
00C07B4D7D81 0040332E103C IPv4        205.229.74.190  208.26.72.3     TCP        80 25950  A    
00C07B4D7D81 0040332E103C IPv4        205.229.74.190  208.26.72.3     TCP        80 25950  AP   
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.74.190  TCP     25950    80  A    
00C07B4D7D81 0040332E103C IPv4        205.229.74.190  208.26.72.3     TCP        80 25950  AP   
00C07B4D7D81 0040332E103C IPv4        205.229.74.190  208.26.72.3     TCP        80 25950  A   F
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.74.190  TCP     25950    80  A    
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.74.190  TCP     25950    80  A   F
00C07B4D7D81 0040332E103C IPv4        205.229.74.190  208.26.72.3     TCP        80 25950  A    
0040332E103C 00C07B4D7D81 IPv4        208.26.72.3     205.229.74.190  TCP     26000    80     S 
02608CD87517 00C07B4D7D81 ARP         A:request ETH:IPv4 208.26.72.2     208.26.72.1    
00C07B4D7D81 02608CD87517 ARP         A:reply   ETH:IPv4 208.26.72.1     208.26.72.2    
0040332E103C 00C07B4D7D81 ARP         A:request ETH:IPv4 208.26.72.3     208.26.72.1    
00C07B4D7D81 0040332E103C ARP         A:reply   ETH:IPv4 208.26.72.1     208.26.72.3    
00C07B4D7D81 0040332E103C IPv4        208.26.72.1     208.26.72.3     ICMP    redirect host             208.26.72.4    

And the report it can generate:


Total:                                                         64,813   13.45M
    IPv4                                                       64,017   12.55M
        ICMP                                                      245   16.34K
            echo reply                                             18    1.23K
            error                                                 147   10.15K
                host unreachable                                    4     436 
                port unreachable                                  142    9.68K
                comm prohibited by filters                          1      46 
            redirect                                                8     368 
                host                                                8     368 
            echo request                                           18    1.21K
            TTL                                                    54    2.43K
                > 0 during transit                                 54    2.43K
        TCP                                                    58,998   11.66M
        UDP                                                     4,774  516.03K
    ARP                                                           796   33.38K
        A:request                                                 425   17.35K
        A:reply                                                   371   16.03K

Generating that report while the program is running was tricky. I didn't want to loose any packets so creating a thread or process (I am doing this under Unix) to handle that should minimize the number of packets lost. I'll skip threads since personally I don't like the way pthreads works (I think the API sucks but that's me and I really can't quantify it more than that) and that leaves fork() (at least under Unix).

But I don't feel that good about the code, since I'm now dealing with signals, and the semantics of signals under Unix is … well … it sucks. I'm sure I have race conditions in there.

Obligatory Picture

[It's the most wonderful time of the year!]

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2019 by Sean Conner. All Rights Reserved.