5:23:21 May 5, 2000 - After a long abscence(due to things like graduation and going to China) I am back. We are now nearing the point where we can release the code. We have successfully integrated ANEP into FreeBSD 3.3.
14:7:8 December 14, 1999 - Again, sorry for the big delay in journal entries. The last month was quite busy. Finished the master's thesis last week. Now in process of moving sane os to Freebsd 3.3 and possibly jdk 1.2.2(will use linux compat ibility of FreeBSD to run the blackdown port). Moving to the new jdk will allow for use of java's new security features. This security features, such as policy objects will be useful in executing switchlets. will update later on progress.
2:48:52 November 10, 1999 - Okay it has been since the beginning of time that I have updated this journal. Since my last entry, my plan of attack has changed fairly drastically. I decided to move the ANEP Higher Level Protocols out of the kernel and into user space. Initially I intended on implementing them in C and then creating JNI methods for kaplanj to access them. I realized that these protocols had many things in common and thus it would be useful to create a protocol development kit for people writing ANEP Higher Level Protocols. Started doing that in C as well. Then realized that Java was the way to go. Much more flexible and easy to understand. For someone new to the ANEP world it will be easy to create a higher layer protocol that uses ANEP. So how is ANEP accessed you ask? I decided to use RAW sockets to acccess ANEP as the higher layer protocols a) often need the ANEP option data in the packet and b) can usually supply their own ANEP headers. I downloaded the original ANEP implementation in java from a few years ago and have managed to integrate the core of that code into my own. My own code develops the notion of an ANETSocket that sends and receives ANEPackets as data. The raw_anep.c code in the kernel guarantees that only correctly formatted ANEPackets are sent up over the native socket to the java layer. I feel this move to user space will allow greater flexiblity in future protocol research. In addition one can envision a research procedure where initially you try out your new protocol in java and once you are happy with it, then implement it with kernel modules for increased performance. These kernel modules could then be installed on the ActiveNode with a similar mechanism that was used to install the java protocol. I'll have to update the rest of the web page accordingly to reflect these changes.
15:9:57 May 11, 1999 - Starting to close up shop for the summer. Jon delivered his java active machine code to me. It seems to be partially working under FreeBSD 3.0.0 with jdk 1.1.7. Will have to inspect later. At this point we will declare a stopping point for the summer. At the moment I have ANEP and the object delivery protocol working for variable size packets(i.e. frag and reassembly actually works). Jon's active machine works as he has previously specified. The "final" step is to glue the two together via native methods. These native methods would resembly the test code I have already written for testing the ability of my implementation to pass data back and forth between two active nodes. Planning must be done this summer for how to completely integrate and upgrade this implementation.
0:43:33 May 8, 1999 - Believe that segmentation and reassembly now works. Took a fair amount of debugging and some design assumptions. These assumptions will be lifted later. Currently they assume that fragments arrive in order and are not carrying less or more data than they should. Must remember the significance of how m_pullup affects an mbuf. Spent about 7 hours tracking down a missing 8 bytes and finally realized i wasn't calling m_pullup correctly. next to install java, and write up native methods. also test frag and reassembly with larger packets(i.e. this test was for 2064 bytes or 2 frags).
15:39:51 April 26, 1999 - Haven't updated this in a while. Last week we achieved successful transmission and reception of an ODP packet. For now little work will be done on this project until after finals(i.e. have to pass all those other classes to graduate). Basically now some glue code needs to be written to create the java native interface. in addition i need to rigorously test the segmentation and reassembly.
4:58:0 April 17, 1999 - Now have two machines and am trying to test receive functionality. Need some way of making an active net address equivalent of INADDRANY. That is when a socket binds it might want to say any addr. Since are addrs are of varying length I had been using just s_addr[0] == 0, but I realize now how bad this is because of the fact that my ethernet address for my two test machines both start with 0 in the first two bytes. I think I will need to code up something so that a test of all san_addr.length bytes yields zero(this could get computational expensive). Or I could say that if the san_addr.scheme_identifier is set to a magic number then to consider the address an ANYADDR. annyoing, but oh well
3:2:49 April 15, 1999 - I sent a packet! After lots of debugging on anep_output.c, anep_input.c and my test programs set_anet_addr, get_anet_addr, and test_anep I was able to transmit a packet on the ethernet. use of tcpdump on the target machine confirmed the packet was received. now i need to get a second freebsd machine(probably the one I gave to jon) to test anep_input(). anep_input should be more difficult to debug, due to its complexity. also have to test for packets > mtu. just came back to the machine, after talking with jon, and the kernel has crashed. darn!. maybe i have a memory leak somewhere. have to check this out.
3:15:29 April 13, 1999 - Okay so packet_length wasn't the problem. though it would be the next problem. I was using a NULL pointer. Yeah a freshman mistake. anyway I believe I have now put in the code to correct this. will test this and then go to bed.
3:12:19 April 12, 1999 - Now am kernel debugging like a madman. Current problem is that the anep->packet_length seems to be getting messed up. Not sure what is happening. Can't quite totally figure out kgdb(gdb -k) so I am putting in printfs.
23:46:12 April 11, 1999 - It compiled!. Now for kernel debugging. I wrote one program to set the address and another to try and allocate a socket, set sockopt, and then send some data. Well the set_addr program went fine. The second one made it up to the sending data parted and then it kernel panicked. I am in the process of re-compiling with the options DIAGNOSTIC flag on. Will likely have to add some #ifdef DIAGNOSTIC printf("....") #endif to my code to track down where I am creating this kernel page fault. Hope it is just some stupid pointer arithmetic or something. Well I guess this is progress though.
23:51:49 April 4, 1999 - It has been a long time since the last journal entry. Much has happened. The code for anep_reass is complete, though of course not tested. Originally I thought it would be an easy adaption of the ip reassembly code, but that proved to be mistaken. The ip reassembly code from Stevens' book relies heavily on overlaying data structures and casting. In addition options in anep are something that come after the static header. Processing these options requires some work. I therefore wrote a function called anep_process_options to extract the fragmentation information, src address, and destination address. I also had to make some implementation choices about an_addrs. Addresses are now limited to 20-bytes. I figure this is reasonable as ipv6 addresses only use 16-bytes. Of course this takes away some generality from anep, but this had to be done in order to have a contiguous data structure for struct an_addr, struct sockaddr_an and other data structures(like struct an_pcb) that have an embedded struct an_addr. The biggest piece of code yet to work on is the ODP code. It should be similar to the UDP code. Kaplan sent the .java files to guide me in what information needs to be communicated and extracted from the datagrams.
12:39:13 March 21, 1999 - Unfortunately have been sick over the last few days. but nonetheless more progress has been made. Almost all of the netanet/a*.c files are compiling now exception anep_output.c. I am still working on that one. Currently I am dealing with issues regarding options processing. Shouldn't take too much longer to solve these issues. an_addr are now struct an_addr { u_int32_t scheme_identifier, u_int16_t length, uint8_t *s_addr}; This way an address is merely an array of uint8_t. This facilitates comparisons of an_addr structs. Work will need to be done on the ODP(Object delivery protocol), but that should not be too hard. Can't wait to test!!!
6:11:31 March 17, 1999 - Worked on anep_input and anep_output primarily and cleaned up some other files. Issues for anep_input and anep_output are the processing of options. Since anep options are given as type-length-values one has to be careful to process them all and process them carefully. more updates later.
6:24:30 March 16, 1999 - Tonight had to deal with the fact that there are multiple styles of address for the active network. So in an_pcb.c I had to write some functions for for comparing an_addr structs and in an.h I had to put in some #define style functions. I also got rid of the notion of wildcard addresses. Therefore I will have to remember this for when people create sockets and bind them without a local address. I guess I will need to disallow that practice and force user apps to select an address scheme and an address.
5:56:2 March 15, 1999 - More progress again. Tonight kaplan and I defined the 3 protocols we will use for our project. They will be Object Delivery Protocol(ODP), for delivering ActiveObjects to be run on the java machine, SANE Secret Protocol, for establishing a shared secret, and SANE Cert protocol, for exchanging certificates. I will provide jon with native methods to allow him to simply GetOBJ(), SendOBJ(), getSecret(), sendSecret(), etc. This is best explained with the diagram I created. As well tonight I tried to fix an_var.h, an_pcb.[ch], and others. I needed to redefine sockaddr_an. It is now a 14byte struct whose finally member, an_addr tells the scheme identifier of the address and gives a pointer to a structure with the actual bits. Hopefully for the sake of comparisons this should work. If not I will need to simply modify the comparisons to handle the diff schemes.
7:42:59 March 14, 1999 - Good progress made again tonight. First, I appropriately renamed things. The directory is no longer netanep/ but now netanet/. AF_ANEP -> AF_ANET, etc. Because ANET is the ActiveNet domain and ANEP is a protocol in that domain. Also had to rename some source files to match this standard. Also had to edit some existing code to fall into shape. So an issue came up, and that is what should sit above the ANEP protocol? I am trying to create a simple unreliable Object Delivery Protocol(ODP) based lightly on UDP. Issues are creeping into my head about exactly how to implement this. Issue 1)Source identifiers in ANEP are varied and given as an option. Now at the anep_input level I could process this option, and I guess store it in a data structure of odp_input. Or I could process this at the odp_input level. Either way it seems relevant, particularly if the user app(Kaplan's code) then wanted to transmit something back to the sender. More on this later. Issue 2)At the Kaplan level Java objects will be serialized and deserialized. So he will be needing to receive serialized objects. Well a design assumption so far has been packet.length < MTU. I imagine many serialized objects are greater than 1500 bytes. So here is where the object delivery protocol comes in. I figure , it is trivial in Java to take a byte stream and hack it up into MTU size byte arrays. I can then send multiple packets for each serialized object and let Kaplan do the re-assembly at the Java level. Yeah, that's the ticket! This is going to be sketch when we are done, but it should work. As well website has been updated (a little). Also working on Active Firewall paper.
4:30:22 March 12, 1999 - Forgot to mention that I have also started work on a paper, active_firewall.tex that will explain the firewall application that Jon, Dan, and I are building to demonstrate SANE O/S. I can also see this paper being incorporated into senior design papers at the end of the term.
4:27:32 March 12, 1999 - Good progress was made tonight. I have finished implementing most of the basics for protocol processing at the lowest layer. New files are sys/netanep/anep_prot_var.h , sys/netanep/anep_input.c, sys/netanep/anep_output.c, etc. Next task is to do the RAW ANEP protocol stuff, which shouldn't be too bad. IN addition I will need to make an aneppcb for the socket stuff. This I will copy a little from inpcb(the internet protocol control block) and try to keep it short. Would like to be able to do a full compile soon and then somehow test this setup. I guess I will need to find a way to put a packet on the wire destined for the sane-dev box and see if it gets picked up.
6:33:4 March 1, 1999 - Worked on trying to get the source ready to be compiled. Also learning where there are points of failure. Had to alter files like /usr/src/sys/conf/options and /usr/src/sys/conf/files in order to make these changes. Still need to find where i can add the anep domain to bsd for startup. assume it is somewhere.
04:00:21 February 21, 1999 - Today completed most of the work for anep_control() in anep.c. Moved on to creating the data structures for the protocols. Figure for now will support one type of socket, i.e. SOCK_RAW. should make things easier. need to find out how to get FREEBSD to initialize the ANEP domain when it starts up. code in tcp/ip illustrated doesn't match actual freebsd code. Need to find out how to add domains. Hoping that soon can plug in the real protocol stuff as based on the existing ANEP Java implementation
03:34:36 February 16, 1999 - Redid the homepage. Need help with getting subdirs readable.
23:10:29 February 7, 1999 - Wanted to update this last night, but then I re-installed/screwed up by IP_Masq box. Anyway last night the real hacking began. I started on anep.c which is similar to in.c. I was focusing primarily on the anep_control function which will process all ioctl requests. Basically I tried to re-use as much of in_control(the ip one) as I could. The idea of addressing in Active Networks is going to be interesting. The RFC defines different "scheme identifiers" like ipv4, ipv6, ethernet for addresses, however these packets still have to get from host to host. Right now I could just use ethernet MAC addressess but that seems a little cumbersone. So for the time being I am going to say that a node is addressed by a 32-bit unsigned long. This will change later. I have also worked on socket structures, namely sockaddr_anep(again akin to sockaddr_in). I am hoping to start compiling something by the end of the week(read I don't plan on doing much of my other homework). I might consider looking at the code in netns/ns.c for how they do their ns_control function. This could give hints as to what is really necessary for this type of function and which is protocol specific. Jon and I are thinking that with active networks we won't completely eliminate IP. IP is useful for data delivery and ANEP will be useful for delivery of control programs. He and I will still have to finalize our plans for me to send packets up to the JAVA layer. I figure he will need some sort of socket interface that I can dump packets onto. He has mentioned the possibility of having to add support for packets of type AF_ANEP to the java virtual machine. more to come in next entry.
3:55:47 February 3, 1999 - Tonight I added files to sys/netanep. In particular I fleshed out anep.h with the information from the RFC on ANEP. I also began further inspection of netinet/in.c which contains some functions useful for generic IOCTL control of the protocol. Likely I will have to modify /usr/sbin/ifconfig to be able to deal with ANEP and dynamically change address and other items. I guess the next hack will have to be on anep.c. Intermediate success will be determined by being able to 1) compile, 2)be able to send a test anep packet to the box, have it received, and not have the protocol crash
22:28:11 February 1, 1999 - Well it has been a long time since I have done this. Anyway the new goals of the project are 1)implement ANEP for FreeBSD 3.0.0, 2)modify scheduler of FreeBSD for active nets, 3)work on memory management. Have so far modified files in /usr/src/sys/net and /usr/src/sys/sys like ethernet.h, netisr.h, etc. Have been adding idea of another protocol, i.e. ANEP, as existing. Next will need to add to the directory /usr/src/sys/netanep. I have been examining /usr/src/sys/netinet and /usr/src/sys/netns for comparison. Also using Stevens's TCP/IP Illustrated Volume 2 for reference on implementation
07:03:05 December 19, 1998 - Today University of Utah released oskit-0.96. I have downloaded and attempted installations on both my i686-linux pc and the i586 freebsd pc. the oskit installs were successull on both. i then downloaded their Kaffe project, which makes a Java Virtual Machine O/s. got that to compile on linux box. couldn't do it on freebsd box. freebsd box is believed to need newer gnu bin utils. Build an o/s image for the linux box of kaffe. can't figure out how to get it to stop having a java.lang.NoClassDefError on boot up. figure it is a problem with specifying which .class file to use when booting up. will have to look into. if this oskit version is a SIGNIFICANT improvement over the last one I used then I will consider switching from FreeBSD to oskit as oskit uses both FreeBSD and linux source. more details to come later.
7:16:43 December 17, 1998 - A few things to cover tonight. First many hours were spent trying to figure out how to access the fla0 as a disk device. Still waiting for responses to some newsgroup posts. Also familiarized myself with the /sbin/init.c code. However, as discovering that after init initializes everything it still runs bash on the /etc/rc file I have determined that I probably will not make significant modifications to init, but rather to /etc/rc. Jon and I discussed the future of this project at about 3:45AM. It has been decided that I will need to provide jon with some interface to the bpf(Berkeley packet filter) in order from him to have his JAVA active switch tell the packet filter to recognize ANEP(or whatever?) type of packets and then punt them to the proper program. Therefore my first new goal will be to understand BPF and write him some native methods to work with it. We basically clarified that my role in this project will be to make FreeBSD a better operating system for running a JAVA based active switch in an AEGIS environment. My first step will be providing him with that native access. In addition I will look to incorporate the M-Systems DiskOnChip 2000 flash disk(fla0) into this project as a way to store keys/certificates on the box. As well later the DiskOnChip 2000 (80MB version) could be used to store all of thea active switch code(FreeBSD+Java+Switch code). From there I will look to add real-time extensions to freebsd. For example, if feasible to eliminate virtual memory and paging, I will do it. In addition I will look into changing the scheduling algorithm such that JAVA gets almost all the system priority. More details to come in next entry. need a little sleep.
4:42:49 December 16, 1998 - Tonight , re-installed 2.2.7 on the 325mb drive. Starting looking through kernel code on init_main.c and in /usr/src/sys/vm directory. Want to find out how to either take out virtual memory or replace the subsystem with one that pretends to do virtual memory but really doesn't. I.e. it is a design goal to eliminate virtual memory and just use flat memory with a part protected for the kernel. it is then assumed that the jvm and associated data will take up the rest. Still looking for a device-driver for the DiskOnChip2000 ISA module I picked up
18:56:11 December 14, 1998 - Received my Eval board for diskonchip 2000. it is a 2mb version of M-system flash's diskonchip product. it looks pretty. jon and I can probably use this to store digital certificates. If we can find a way to write protect it then we can make some assumptions about integrity of certificates. If not it will be cool to have anyway.
13:49:30 December 13, 1998 - Last night moved the freebsd source onto my linux server and set up nfs. I will alter this copy of the source for my project. Source is approx 360MB for everything that I got via cvsup. Now I need to reinstall FreeBSD on the 300mb hard disk and get to a well-document state so that I can modify the source, re-compile, and reboot to try the new kernel. I also installed jdk 1.1.7 and was able to run a test program from rc.local. Basically I figure that I will continue to run the jvm with kaplan's code from rc.local and then I will just eliminate the whole login prompt from the local box. Again, goal is to make all i/o go through serial port and therefore strip out the video card(if BIOS permits).
2:44:50 December 5, 1998 - Thinking about picoBSD. Is it really necessary. Since we are working with 120MB we don't really need to leverage a project designed to fit FreeBSD into 1.44MB. Point of reference, just did a minimal install of FREEBSD plus the jdk 1.1.7 onto another drive. Total size about 80MB. That leaves 40MB for java class files/etc. Maybe should work from top-down. That is get a good script going for building this minimal image plus jdk and then start modifying kernel. Over next few days, maybe should try to get this install to automatically load JVM and run jon's code. that would be good, cuz then I could start just hacking kernel.
3:10:30 November 29, 1998 - Mostly working on updating web page right now.
19:26:26 November 28, 1998 - Progress has been made in the last week or so. After installing a caviar 2340 (325mb IDE drive), figuring out how to make an /etc/disktab entry, and how to use disklabel, newfs, etc. I was able to make a bootable PicoBSD for the IDE drive. Major changes to build script were for which boot loader to use and which /etc/disktab entry to model the vnode after when creating the disk image. Current problem is that after it is done majority of boot-up stuff it wants to try and mount /dev/fd0a, which is a problem since it is now on floppy. I will have to look into this soon. As well I need to increase the partition size on the IDE drive(currently it is just using a 1.44mb partition) so that I can put the java binaries and kaplan's class files there.
22:6:2 November 18, 1998 - Will now begin building for a 120mb image. Confirmation on LS-120 is not guaranteed. Have concerns about bios support. For now will use IDE disk partition of 120mb. Setting up development and test environment for this new configuration.
21:54:13 November 18, 1998 - Journal moved to cis website at
23:49:7 November 7, 1998 - Was able to compile custom version of picobsd. had to strip out stuff for snmpd. hopefully won't need to use it yet. Later when using LS-120 drive will be able to build larger images and thus include more stuff.
2:15:34 November 7, 1998 - A slight update. I checked release/picobsd/build and actually found a picobsd.bin. This indicates that maybe(regardless of the the ./build output says) that maybe, just maybe the build succeeded. Well I wrote the image to disk and booted it on the test machine. While loading and beginning to execute the kernel it rebooted. Will now try on the development machine. Same result. Okay well I guess I need to work on this.
Note: Due to a data-backup error and programming error, all journal entries from may 5 to nov 6 are lost. Summary of entries: Went to 3com to work for summer, learned more about active networking, came back, purchased/obtained/borrowed equipment, set up dev and test environment. got started on custom version of freebsd.
0:55:34 May 3, 1998 - Still having faults with the filesystem. I believe I have located the fault. However, I cannot find the cause. Inside block_glue.c under the block_io function is something that is causing the fault. I assume it is some sort of memory access error , but I cannot guarantee. Maybe a bad pointer, or something. The odd thing is, that even though it faults, the actual write to the disk still gets carried through. I do not understand why this would occur. Again, this could all be due to a fault in OSKit, much like the network problem from before. More investigation will have to be done. Still I feel as if writing an entire ide interface from the ground up would take at least 6 months and therefore I am stuck with what OSKit has. Currently the plan is turn the research machine provided by DSL over to Professor Smith on May 6th or 7th. If possible work will continue on my personal machine, but it is not likely as I will be at 3com this summer, doing active networking research for them.
13:10:54 April 29, 1998 - This is actually a delayed journal entry from last night. I was quite frustrated and went to bed. Anyway it appears that the porting of the old filesystem is done, but with some bugs. Moving to a model of always reading a 512 byte block at a time changes some things. Previously the file system could be read for any number of bytes at a time. Currently the O/S is trapping or rebooting while in the process of creating a new file. However a quick dd if=/dev/hda4 of=test.txt bs=512 count=2 and then an octal dump of test.txt shows that indeed the file has been created. However the reference to the file in block1(bytes 0 to 511) is absent. Thus I believe the O/S is faulting while trying to update this value. With the O/S rebooting, debugging has become difficult, without using the sane_direct_cons_getchar() method. Later today or tommorrow, or next week(after my two exams on Friday) I will try to fix this.
2:59:46 April 28, 1998 - Spent most of the night porting the old cse380 filesystem to run under SANE O/S. Progress seems good and it compiled. Key things to remember are that now the cse380 filesystem is based on 512 byte blocks as opposed to its original 46 byte blocks. The blocks are structed such that the first char indicates whether or not the block is free, the next 510 bytes are data(either a C_BLOCK or a D_BLOCK), and the last byte indicates whether or not the block is free. The first block in the system is the root block. Currently there is no superblock. This fs is pretty darn inefficient. But it should do for the time being. Tommorrow must try to test the FS. As for now I will tar and gzip up the essentials for system recovery and ftp them to force.stwing. Eventually documentation on this filesystem will exist.
23:56:23 April 25, 1998 - I believe the OSKIT's implementation of an interface to the ext2fs is really messed up. I found that their struct ext2_super_block was not consistent with the one linux has. I have tried to correct this. I have also tried to # define some of the macros that linux's ext2_fs.h has into OSKIt's ext2_fs.h. I altered read_inode, and ino2blk in ext2_file_io.c in order to try and make them conform to the way linux calculates the correct block to use, etc. So far no success. fsread_ext2_open still is showing that I have the wrong inode, offset, or something as it thinks the root_ino is not a directory.
2:26:34 April 18, 1998 - Tonight I explored the ext2_fs interface from OSKIt. Had to fix some of the things they had that were broken. For example they didn't know where the real superblock for an ext2_fs partition was. They had it as 2 and linux has it as 1. I decided linux was right, so I changed the code in fsread/ext2_file_io.c. I am still trying to call fsread_ext2_open(oskit_blkio_t *io, char *name, oskit_blkio_t **out) and it almost works. It is at the point now where it is reading what is believes is the ROOTINO of the partition. It is then trying to determine if the i_mode & IFMT == IDIR to make sure that it is a directory. This seems to make sense as I would expect the root inode to be the / directory. However that above comparison fails each time. I am suspect that when the fsread/ext2_file_io.c read_inode(.,.) function is called that it is miscalculated the offset within the buffer that was read for finding the proper inode. I have been look in the linux fs sources at /usr/src/linux/fs/ext2/.... In inode.c there is an example of a similar calculation. I need to determine if these methods of calculating offsets yield the same result. If not then I will try to port the linux one over as again linux knows how to work with its own file system. This could be much like the problem with tulip.c in that the OSKIT one was screwed up and porting the linux one makes it all work. And yes there is no documentation on the OSKIT stuff in /docs.
3:44:33 April 10, 1998 - I think my earlier traps/reboots where due to accessing non-existant memory or overwriting code. though not sure. cannot yet rule out kernel size as a cause for random reboot. Now I am trying to interface with the ext2fs file system. It appears I will need to create my own blkio_t object for interface to the oskit code. This could take some time(like 4 or 5 hours at a minimum). So this weekend will have to look at that. After that it seems that I can call code in the fs_read library and try to read a file.
1:59:58 April 10, 1998 - Networking is now working. I know that is a bold statement, but it at least seems true. I found the problem to be OSKIT's copy of the tulip.c driver. So I copied the one I had from redhat linux 5.0 and modified it slightly. Now I can transmit and receive packets. For the fun of it I made a kernel that does packet sniffing. Sorta like tcpdump minus the filters. Anyway I figure now I am at an interesting point. Obviously I can send packets, receive packets, etc. So should I now work on building a networking interface for SANE apps. Or should I turn my attention to that nagging problem of accessing the disk and reading files. As well I could work on my shell, process management, etc. I think I will build a minimal network layer and worry about improving it later. At least now I have something.
April 8, 1998 - The fight goes on. Mailed angelos, jms, and waa concerning tcpdump to determine if it filtered raw ethernet packets and chucked them if they weren't special (i.e. ip/tcp/udp/bootp/arp/etc). angelos said no it will take raw ethernet packets. he was ensure about what it would do with a bad ethernet packet. so i decided to hack together a ip/udp packet and send that. still tcpdump reports nothing. i decided to do more hacking on tulip.c. I added printfs in tulip_open and tulip_interrupt. In tulip_interrupt I added a printf for when the interrupt occured due to tx-done. i.e. the transmit has been complete. running this kernel showed that the interrupts do occur and that after I believe i transmit the packet an interrupt for tx-done is generated. This is becoming very trying. I cannot yet figure out what is happening to my packet. Is there some relationship between the bare hardware/tulip.c/oskit/my code that is forcing the device to not send the actual packet but rather garbage? Must figure this out soon.
April 4, 1998 - Arg. Arg. Arg. It now appears that something is being transmitted on the wire I just don't know what. I have hacked around with tulip.c, the device driver that is being used by the ethernet card in the sane machine. I have had it dump out the data it has for transmit and it matches what I have send it. So why won't my laptop running tcpdump detect the packet, especially considering it is being send to it. This is annoying. My "proof" that something is on the wire is that the hub(one borrowed from salex) lights during the transmit. Other than that I seem lost. Will have to try and diagnose further.
April 3, 1998 - Now getting very close to transmitting ethernet packets through the oskit's provided driver facility. Soon should be able to do it and start building something real. Oddly the OSKit's example kernel which uses bootp to get its IP address does not work. Using tcpdump on my laptop which is connected via a hub to the SANE test machine I notice that although the SANE machine is able to make the hub light I never see any packets actually send out according to tcpdump on the laptop. Don't know why this is. Highly doubt that tcpdump is missing them. Will have to investigate further.
April 2, 1998 - I have ripped out the IP portions of my test code and am now trying to find a decent way using OSKIT to interface with the ethernet card and pump out some packets. So far it looks like I need to trace my way through some data structures to a function that lets me push something onto the card through its device driver. Important data structures seem to be oskit_netio, bufio, etc. I am hoping I don't have to code up large client functions just to do network sending, but if necessary I will. Need to obtain either a small pocket hub or a null ethernet wire so I can see if I am actually pushing anything out. Figure if I use the ethernet wire then I can run tcpdump on the other machine and watch the stuff come in. Or with the hub I am sure there are some activity leds that blink when something is transmitted. The issues with the filesystem are still on hold as I am concentrating on the network stuff as I see more potential for progress there. Again, worst case I will have to port my old cse380 filesystem to the SANE OS. This is all looking ugly. Recently subscribed to comp.lang.asm.x86 newsgroup so possibly can get some help there. Need to find documentation on OS development, bios, hardware interface, video interface, etc. OSKit might be worth the trouble but I am not yet sure. The lack of documentation is getting annoying as tracing through a huge source tree without any direction is time consuming to say the least. Will try to get in touch with INTEL to get Vol 3 of their manuals on the Pentium. Vol 3 covers issues for OS developers.
March 31, 1998 - Another update for today. I finally have the cursor at the correct position on the screen. Ended up not being a problem with outputting to the i/o ports(thank god) but rather a problem with how I cleared a line in video memory. So that problem is solved and now I can go to bed(oh no, can't do that yet), Now I can work on getting the network card to do what I want.
March 31, 1998 - For the last week SANE has kept rebooting 7/10 times when doing its device probe. This is not good. the other 3/10 times result in trap no 6(which I thought was for invalid opcode according to Intel literature). My first inclinations where that my kernel was over-running some critical memory address. But the kernel is loaded above 1mb in protected mode so that shouldn't happen. i moved the kernel to start at 2mb, 4mb, 8mb, 16mb, and still it rebooted. i next suspected that the size of the kernel image was a problem. The kernel i was using was about 1.23 mb. i said hmmph, maybe since it is bigger than 1MB i am having a problem. i had kernels at about 950k that worked just fine. However I have been able to run a slightly different kernel that is about 1.08MB without the reboot phenonmem. This is very confusing. To attempt to figure out what is up I am trying to do serial-line remote gdb. So far the OSKIt's code for accessing the serial port has not worked the way I expected it to. I tried to have it dump to both a dec vt-220 terminal set in vt-220 mode and in vt-100 mode. I figure that maybe the vt-220 protocol was screwing up the rather raw ascii dump of the OSKIt's gdb-serial functionality so I altered some serial port code I had made a few years ago on my laptop and had the same problems. I checked and the baud rate on both the SANE test machine and my laptop/and or vt-220 terminal where the same. I had no problem with a serial connection between the SANE test machine under Redhat Linux and the vt-220 terminal or my laptop-serial program. So I might have to re-write some of the code from the OSKIt. As well I am trying to get the cursor to appear on the right place on the screen. This is supposedly accomplished by outputting to the correct registers on the video card. However either I am screwing up the C-style casting and shifting of various numbers or it is just not working. I ran some assembly code on my personal laptop and had no problem placing the cursor anywhere I wanted to. So this is a stumper. Progress is not happening as far as I am concerned. I would like to have this basic hardware interface stuff done soon so I can work on the real OS design. I apologize for the incoherence and babbling of the above entry but I am quite ill right now and thus can't edit too well.
March 14, 1998 - For SANE OS I can finally read the disk. Now is the matter of reading the disk in a meaningful way. I am trying to use linux's code for its ext2fs to mount the disk and the read and write files/subdirs/ etc. Hopefully this can happen today and then I can move on to reading and executing a binary.
February 16, 1998 - Progress on the SANE OS has progressed rapidly in the last 4 weeks. Now I can actually boot the PC, display color-text graphics, scroll up and down the screen. I have initiated a device-probe and am now trying to interface with the hard disk "hda" in a meaningful way. I am trying to work within the Linux device driver frame of reference and if possible use the existing ext2fs file system that is on the linux partition. If not I have created an empty partition at the end of the disk that I can use for a filesystem of my own creation. Each day it is looking more and more like I will be creating my own filesystem. Luckily that was done in CSE 380(the course I TA'd this fall) last year. It seems like I am getting to the top of the hill where the waterfall starts and the really good work starts happening. This will definitely make building the TEAM O/S next year much easier. It still looks difficult but now it at least seems feasible. Other good news is that a new version of OSKit should be coming out of the University of Utah "real soon". This will eliminate having to fill in the gaps in their current software and hopefully fix some bugs. Oh well back to the disk.
October 25, 1997 - At this point I am spending most of my time working on school work and work in the DSL. Trying to build an O/S to support a secure Active Node should teach me enough to allow me to complete my own senior design project next year.
September 30th, 1997 - Have read about AEGIS, a secure bootstrap method for booting an O/S. As well I have read about doing recovery should the AEGIS boot process fail an integrity check. This bootstrap process will be considered for use with TEAM O/S. Journal entries are expected to slow down(as if they weren't slow enough) over the next couple of months as I am engaged in research with the Active Networks team here at PENN and am taking a significant course load.
September 15th, 1997 - I have been reviewing OSKit created at the University of Utah. In the future I will probably consider using the OSKit to boot my OS.
September 3rd, 1997 - School has begun. I will be doing research in the DSL this year with Prof. Smith and Bill Arbaugh. This research should allow me to further my studies of operating systems and networking. Still have to get around to writing comments on those papers I read.
August 11th, 1997 - Work at BellCore has consumed most of my time in the past few weeks. However I have been able to read through sections of Advanced Programming in the UNIX Environment by W. Richard Stevens(1992). I found some useful readings on the use of pseudo-terminals(ptys). Possibly during simulations of TEAM O/S I will be using ptys for to facilitate terminal interaction between different users.
July 25th, 1997 - This is my first journal entry for the project. To date I have read a few papers concerning distributed scheduling protocols and market based methods for resource allocation. As well I have read sections in Tannenbaum concerning distributed systems and a large portion of The Magic Garden Explained. I should be writing comments on the papers soon.