<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<feed xmlns="http://www.w3.org/2005/Atom">

	<title>Planet FreeBSD Summer of Code 2008</title>
	<!--<link rel="self" type="text/atom" href=""/>-->
	<link rel="alternate" type="text/html" href="http://planet.freebsdish.org/soc2008"/>
	<id></id>
	<updated>2008-08-28T23:32:09+00:00</updated>
	<generator uri="http://www.planetplanet.org/">Planet/2.0 +http://www.planetplanet.org</generator>

	<entry>
		<title>Przemek Witaszczyk: WANTED: PIC driver...</title>
		<link rel="alternate" type="text/html" href="http://bitbay.blogspot.com/2008/08/wanted-pic-driver.html"/>
		<id>tag:blogger.com,1999:blog-6454200798774615510.post-2173663107224743977</id>
		<updated>2008-08-27T07:01:00+00:00</updated>
		<content type="html">Finally, I've managed to fix all (at least up till now..) broken OF calls, and the kernel went further, to the place where devices are attached. Among them, there should be a PIC driver, which is missing... After adding the ofwbus driver which I got from Andrew, I've constructed a PIC driver skeleton from the sys/powerpc/powermac/hrowpic.c. The PIC was found to resist on the ofwbus3, and the attch method fails to allocate memory (nice screenshot on my wiki http://wiki.freebsd.org/Porting_FreeBSD_to_Efika_(PPC_bring_up)). Now I have to mutate the old mac driver to obey the mpc5k2 will... I've also created a new folder in the p4 branch, where all the stuff concerning MPC5200B will be stored. It's called ... mpc5k2 :)</content>
		<author>
			<name>vi0 (noreply@blogger.com)</name>
			<uri>http://bitbay.blogspot.com/</uri>
		</author>
	</entry>

	<entry>
		<title>Przemek Witaszczyk: Staying late pays...</title>
		<link rel="alternate" type="text/html" href="http://bitbay.blogspot.com/2008/08/staying-late-pays.html"/>
		<id>tag:blogger.com,1999:blog-6454200798774615510.post-1603866010460684580</id>
		<updated>2008-08-19T18:52:00+00:00</updated>
		<content type="html">&lt;p&gt;Thanks to simple, yet great advice by Andrew Turner concerning calls to openfirmware and utilizing *OF_buf, it seems that eventually I came to the point where the kernel panics due to the lack of PIC!:&lt;/p&gt;&lt;p&gt;===================&lt;/p&gt;&lt;p&gt;&#160;atomic_subtract_16(0)... panic: no PIC detected&lt;br /&gt;&lt;br /&gt;KDB: enter: panic&lt;br /&gt;[thread pid 0 tid 100000 ]&lt;br /&gt;Stopped at      0x29587c:       addi    r0, r0, 0x0&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;===================&lt;/p&gt;&lt;p&gt;As you can see, the KDB by itself stops at this point, no crash at last:)&lt;/p&gt;&lt;p&gt;All thanks to the AT and the fact that I'm studying hard for the exam (Quantum Mechanics for PhD students....)&lt;/p&gt;</content>
		<author>
			<name>vi0 (noreply@blogger.com)</name>
			<uri>http://bitbay.blogspot.com/</uri>
		</author>
	</entry>

	<entry>
		<title>Przemek Witaszczyk: /*decr_init()*/</title>
		<link rel="alternate" type="text/html" href="http://bitbay.blogspot.com/2008/08/decrinit.html"/>
		<id>tag:blogger.com,1999:blog-6454200798774615510.post-8472821194294522838</id>
		<updated>2008-08-19T06:54:00+00:00</updated>
		<content type="html">&lt;p&gt;Some new things came up recentrly, I've added some code from NetBSD and commented out the decr_init() in cpu_startup(). Now, during the boot I've rached subsystem 3800000 , as last time w/o decr_init(), but this time it seems it entered the newbus!&lt;/p&gt;&lt;p&gt;==========================================&lt;/p&gt;&lt;p&gt;[thread pid 0 tid 100000 ]&lt;br /&gt;Breakpoint at   0x4930d8:       stwu    r1, r1, -0x20&lt;br /&gt;db&gt;&lt;br /&gt;nexus0: registered as a time-of-day clock (resolution 1000us)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type memory (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type (unknown) (no driver attached)&lt;br /&gt;nexus0: , type serial (no driver attached)&lt;br /&gt;nexus0: , type builtin (no driver attached)&lt;br /&gt;nexus0: , type pci (no driver attached)&lt;br /&gt;sc0: no video adapter found.&lt;br /&gt;nexus0: , type syscons (no driver attached)&lt;br /&gt;done.&lt;br /&gt;&#160;  ofw_bus_gen_get_name(0)... cpu_exception:&lt;br /&gt;SRR0 0x01035CFC SRR1  0x00003030 MSR  0x00003030&lt;br /&gt;LR   0x0103E1E4 CTR   0x0101A5F0 CR   0x44002042   XER 0x20000000&lt;br /&gt;DAR  0xD0004DDE DSISR 0x42000000 Type 3&lt;br /&gt;GPR[] 0x00000007 0x00559EB4 0x00000000 0x00000000 0x07C05323 0x00000005 0x0000000D 0x0058EBB8&lt;br /&gt;&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;============================================&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And again, the old friend. I can't spot the cause of those crashes. They always look the same, with the same content of SRR0,1 and MSR. Adding some stuff from NetBSD helped, but it only took it just a few steps further. Thus it must be something wih the OF, but what? This time it's nothing about the stack, because the registers contains some crazy addresses, neither form kernel, nor from the OF stack... During some previous tests I've encountered some crashes on instructions reading/writing to SPRG0 and IBAT4, in &#160;ofw_sprg_prepare(); and in&lt;/p&gt;&lt;p&gt;===========&lt;/p&gt;&lt;p&gt;from: src/sys/powerpc/aim/ofw_machdep.c&lt;/p&gt;&lt;p&gt;&#160;__asm __volatile(       &quot;\t&quot;&lt;br /&gt;&#160;               &quot;sync\n\t&quot;&lt;br /&gt;&#160;               &quot;mfmsr  %0\n\t&quot;&lt;br /&gt;&#160;               &quot;mtmsr  %1\n\t&quot;&lt;br /&gt;&#160;               &quot;isync\n&quot;&lt;br /&gt;&#160;               : &quot;=r&quot; (oldmsr)&lt;br /&gt;&#160;               : &quot;r&quot; (ofmsr[0])&lt;br /&gt;&#160;       );&lt;br /&gt;============&lt;br /&gt;&lt;/p&gt;&lt;p&gt;both in openfirmware()...&lt;/p&gt;</content>
		<author>
			<name>vi0 (noreply@blogger.com)</name>
			<uri>http://bitbay.blogspot.com/</uri>
		</author>
	</entry>

	<entry>
		<title>Ryan French: Final Summer of Code Report</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/rfrench/2008/08/18/final-summer-of-code-report/"/>
		<id>http://blogs.freebsdish.org/rfrench/2008/08/18/final-summer-of-code-report/</id>
		<updated>2008-08-18T23:21:26+00:00</updated>
		<content type="html">&lt;p&gt;Summer of Code has now officially finished. Well, at least the coding part of it has. This is my final GSoC report, but hopefully will not be my last post here. As it stands at the moment, I have not managed to get sending and receiving working, but I am very close to it. I honestly am unsure as to why it is not working,&#160; but I believe it may be to do with how I have tied my code into the kernel, and I dont think it is getting initialized or compiled with the right preprocessor defines or something. However, I will still be working on getting this going, as not only is it my dissertation for university this year to do this, but it has become somewhat of a personal challenge to prove to myself that I can do it.&lt;/p&gt;
&lt;p&gt;With that in mind I will keep on working on this at every oppurtunity I get, and will definately have at least sending/receiving working by October, which is when the dissertation is due. So here is a run down of what I have accomplished so far for the GSoC, and what I plan to implement in the future.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accomplished:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;MPLS-needle - this is a small tool I built for testing of MPLS. It takes a configuration file and uses that to define and build an MPLS packet, which is then inserted onto the networking stack using a BPF device.&lt;/p&gt;
&lt;p&gt;Basic port of OpenBSD/Ayame code - I have been working solidly for the last few months on porting the OpenBSD code, which is based on Ayame, to FreeBSD. This was a much bigger task than I orginally intended. As I have had no previous experience with kernel coding this has involved a huge learning curve, not only in just kernel coding itself, but in how the FreeBSD networking code works, and how it differs to OpenBSD (by the way, it is a lot more than I thought it would be). The code has been ported over and changed accordingly, but still does not work. However, the kernel does compile and run, it just appears that the MPLS code does not run when a packet is received. I think this is because of incorrect #defines, as I&amp;#8217;m not entirely sure where I need to define these (in the Makefile or somewhere in my code). I will continue to work on this and attempt to get it working asap.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Future Plans:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once basic sending/receiving is acheived, I will be attempting to implement the following features. I believe this will be a lot easier as I will be working mostly on my own code, independant of the kernel code itself, but I have been known to be wrong before.&lt;/p&gt;
&lt;p&gt;Routing Table Manipulation - create a way to store, insert, edit and delete MPLS routes in a table.&lt;/p&gt;
&lt;p&gt;Static Label Switching - being able to receive a packet, swap the label, and send it out using a statically defined route in the routing table.&lt;/p&gt;
&lt;p&gt;LDP Implementation - implement the LDP daemon for autmatic label distribution and routing table building.&lt;/p&gt;
&lt;p&gt;Tunnels - implement MPLS L2 and L3 tunnels with first virtual interfaces, and then real interfaces.&lt;/p&gt;
&lt;p&gt;At least thats the plan for now, and I&amp;#8217;m really hoping that it becomes a reality.&lt;/p&gt;
&lt;p&gt;I would like to take this chance to thank everyone that has helped me through this transition into kernel hacking and opensource hacking. It has been a lot of fun, with a lot of frustration, but very much worth it. If anyone would like to take a look at my work and provide some feedback, whether it be stuff I need to change, or help on completing my goals, it would be welcomed and very much appreciated. The code can be viewed &lt;a href=&quot;http://p4web.freebsd.org/@md=d&amp;cd=//depot/projects/soc2008/&amp;c=AN8@//depot/projects/soc2008/rfrench_mpls/?ac=83&quot; title=&quot;rfrench_mpls on Perforce&quot;&gt;here&lt;/a&gt; on Perforce.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;-Ryan French.&lt;/p&gt;</content>
		<author>
			<name>Ryan French</name>
			<uri>http://blogs.freebsdish.org/rfrench</uri>
		</author>
	</entry>

	<entry>
		<title>Przemek Witaszczyk: odd discovery</title>
		<link rel="alternate" type="text/html" href="http://bitbay.blogspot.com/2008/08/odd-discovery.html"/>
		<id>tag:blogger.com,1999:blog-6454200798774615510.post-5329895237445517790</id>
		<updated>2008-08-17T17:41:00+00:00</updated>
		<content type="html">&lt;p&gt;I was fighting with the OF_peer() to check if it passes the openfirmware() call, which is OF entry and after lots of tries it seems that it does. It's very different from what I thought before. After using ofw_stack() from NetBSD in OF_peer() as it was done in OF_read()/OF_write(), that function seems to be working but the crash remains.&#160;&lt;/p&gt;&lt;p&gt;Here's the dump:&lt;/p&gt;&lt;p&gt;DEBUG 2&lt;br /&gt;done.&lt;br /&gt;subsystem 2100000&lt;br /&gt;&#160;  freebsd4_sigreturn(0)...&lt;br /&gt;cpu_startup() DEBUG 0&lt;br /&gt;** DEBUGL OF_printf(): after OF_peer() in decr_init()&lt;br /&gt;cpu_exception:&lt;br /&gt;SRR0 0x004A0DF0 SRR1  0x00003030 MSR  0x00003030&lt;br /&gt;LR   0x01003ED8 CTR   0x00000000 CR   0x24002044   XER 0x0&lt;br /&gt;DAR  0xD0004D3C DSISR 0x42000000 Type 3&lt;br /&gt;========================&lt;br /&gt;What is very strange, during the trace I've encountered the call to OF_write() just after OF_peer(), like there were _two_ calls to openfirmware() insted of one. And it's the second one that crashes... Now, what I don't get is where from this second call come ? There's no printf() around OF_peer()...:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;========================&lt;/p&gt;&lt;p&gt;from: sys/dev/ofw/openfirm.c&lt;/p&gt;&lt;p&gt;phandle_t&lt;br /&gt;OF_peer(phandle_t node)&lt;br /&gt;{&lt;br /&gt;&#160;       &#160; &#160; static struct {&lt;br /&gt;&#160;&#160;               &#160; &#160;cell_t name;&lt;br /&gt;&#160;               &#160; &#160; cell_t nargs;&lt;br /&gt;&#160; &#160; &#160;               cell_t nreturns;&lt;br /&gt;&#160;               &#160; &#160; cell_t node;&lt;br /&gt;&#160;               &#160; &#160; cell_t next; } &lt;/p&gt;&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;args = {&lt;br /&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(cell_t)&quot;peer&quot;,&lt;br /&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; 1,&lt;br /&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; 1,&lt;br /&gt;&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;};&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&#160;       ofw_stack();&lt;br /&gt;&#160;       args.node = node;&lt;br /&gt;&#160;       if (openfirmware(&amp;amp;args) == -1)&lt;br /&gt;&#160;               return (-1);&lt;br /&gt;&#160;       return (args.next);&lt;br /&gt;}&lt;br /&gt;=========================&lt;br /&gt;&lt;/p&gt;</content>
		<author>
			<name>vi0 (noreply@blogger.com)</name>
			<uri>http://bitbay.blogspot.com/</uri>
		</author>
	</entry>

	<entry>
		<title>Vincenzo Iozzo: Final results</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/snagg/2008/08/16/final-results/"/>
		<id>http://blogs.freebsdish.org/snagg/2008/08/16/final-results/</id>
		<updated>2008-08-16T19:08:17+00:00</updated>
		<content type="html">&lt;p&gt;Hi all,&#160;it has been a long time since my last post. Due to some problems I didn&amp;#8217;t have the chance to update this blog. Anyhow before the end of the soc, I&amp;#8217;m here to speak about what I did in this period.First of all my auditpipe patch changed a bit: it supports only pid-based subscription to events due to internal decision taken by me and other developers. How to use it then?&lt;br /&gt;
fd = open(&amp;#8221;/dev/auditpipe&amp;#8221;, O_RDONLY);&lt;br /&gt;
	if (fd &amp;lt; 0)&lt;br /&gt;
		err(-1, &amp;#8220;/dev/auditpipe&amp;#8221;);&lt;/p&gt;
&lt;p&gt;	entry = malloc(sizeof(struct auditpipe_ioctl_preselect_proc));&lt;br /&gt;
	if(entry == NULL)&lt;br /&gt;
		err(-1, &amp;#8220;MALLOC&amp;#8221;);&lt;/p&gt;
&lt;p&gt;	value = AUDITPIPE_PRESELECT_MODE_PROC;&lt;br /&gt;
	if (ioctl(fd, AUDITPIPE_SET_PRESELECT_MODE, &amp;amp;value) aipp_pid = pid;&lt;/p&gt;
&lt;p&gt;	if (ioctl(fd, AUDITPIPE_SET_PRESELECT_PROC, entry) &amp;lt; 0)&lt;br /&gt;
			err(-1, &amp;#8220;AUDITPIPE_SET_PRESELECT_EVENTS&amp;#8221;);&lt;/p&gt;
&lt;p&gt;What it does is to open auditpipe, change the preselection mode to AUDITPIPE_PRESELECT_MODE_PROC and set up an entry with a specific pid. From there on auditpipe will trace that specific pid. Clean and concise:P&#160;&#160;&#160;Now the second half of the project. I ought to write a regression test framework. After several unsuccessful attempts, I figured out how to make it works with a bit of shared memory. The general idea is to have a testing function/process which communicates with a parent process and exchange runtime information in order to run the test. &#160;The testing function will take read records from auditpipe and compare them with runtime information collected before. If some inconsistencies are found they are reported.&#160;More in details, here is a sample testing module:&lt;br /&gt;
/*-&lt;br /&gt;
 * Copyright (c) 2008 Vincenzo Iozzo&lt;br /&gt;
 * All rights reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * Redistribution and use in source and binary forms, with or without&lt;br /&gt;
 * modification, are permitted provided that the following conditions&lt;br /&gt;
 * are met:&lt;br /&gt;
 * 1. Redistributions of source code must retain the above copyright&lt;br /&gt;
 *    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
 * 2. Redistributions in binary form must reproduce the above copyright&lt;br /&gt;
 *    notice, this list of conditions and the following disclaimer in the&lt;br /&gt;
 *    documentation and/or other materials provided with the distribution.&lt;br /&gt;
 *&lt;br /&gt;
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS &amp;#8220;AS IS&amp;#8221; AND&lt;br /&gt;
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;br /&gt;
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE&lt;br /&gt;
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE&lt;br /&gt;
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;br /&gt;
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS&lt;br /&gt;
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;br /&gt;
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT&lt;br /&gt;
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY&lt;br /&gt;
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF&lt;br /&gt;
 * SUCH DAMAGE.&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;/p&gt;
&lt;p&gt;#include &amp;#8220;audit_pipe_regression_test_utils.h&amp;#8221;&lt;/p&gt;
&lt;p&gt;struct sysctl_record&lt;br /&gt;
{&lt;br /&gt;
	int mib[6];&lt;br /&gt;
	char err_val[256];&lt;br /&gt;
	int ret;&lt;br /&gt;
	int index;&lt;br /&gt;
	struct sysctl_record *next;&lt;br /&gt;
};&lt;/p&gt;
&lt;p&gt;struct sysctl_record *&lt;br /&gt;
add_field(struct sysctl_record *head, struct sysctl_record *new)&lt;br /&gt;
{&lt;br /&gt;
	struct sysctl_record *tmp;&lt;/p&gt;
&lt;p&gt;	tmp = head;&lt;br /&gt;
	if(tmp == NULL) {&lt;br /&gt;
		new-&amp;gt;next = NULL;&lt;br /&gt;
		return (new);&lt;br /&gt;
	}&lt;/p&gt;
&lt;p&gt;	/* Reach the last element of the list*/&lt;br /&gt;
	for(; tmp-&amp;gt;next != NULL;tmp = tmp-&amp;gt;next);&lt;/p&gt;
&lt;p&gt;	new-&amp;gt;index = tmp-&amp;gt;index +1;&lt;br /&gt;
	tmp-&amp;gt;next= new;&lt;br /&gt;
	new-&amp;gt;next = NULL;&lt;/p&gt;
&lt;p&gt;	return (head);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;void test_sysctl()&lt;br /&gt;
{&lt;br /&gt;
	int mib[2];&lt;br /&gt;
	int ret, val;&lt;/p&gt;
&lt;p&gt;	init_channel_primary();&lt;/p&gt;
&lt;p&gt;	mib[0] = CTL_KERN;&lt;br /&gt;
	mib[1] = KERN_SECURELVL;&lt;br /&gt;
	val = 2;&lt;br /&gt;
	ret = sysctl(&amp;amp;mib, 2, NULL, NULL, &amp;amp;val, sizeof(int));&lt;/p&gt;
&lt;p&gt;	write_int(mib[0], &amp;#8220;arg&amp;#8221;);&lt;br /&gt;
	write_int(mib[1], &amp;#8220;arg1&amp;#8243;);&lt;br /&gt;
	write_int(ret, &amp;#8220;ret&amp;#8221;);&lt;br /&gt;
	if (ret == -1)&lt;br /&gt;
		write_string(strerror(errno), &amp;#8220;ret_val&amp;#8221;);&lt;br /&gt;
	else&lt;br /&gt;
		write_string(&amp;#8221;success&amp;#8221;, &amp;#8220;ret_val&amp;#8221;);&lt;br /&gt;
	write_end();&lt;/p&gt;
&lt;p&gt;	val = 1;&lt;br /&gt;
	ret = sysctl(&amp;amp;mib, 2, NULL, NULL, &amp;amp;val, sizeof(int));&lt;br /&gt;
	write_int(mib[0], &amp;#8220;arg&amp;#8221;);&lt;br /&gt;
	write_int(mib[1], &amp;#8220;arg1&amp;#8243;);&lt;br /&gt;
	write_int(ret, &amp;#8220;ret&amp;#8221;);&lt;br /&gt;
	if (ret == -1)&lt;br /&gt;
		write_string(strerror(errno), &amp;#8220;ret_val&amp;#8221;);&lt;br /&gt;
	else&lt;br /&gt;
		write_string(&amp;#8221;success&amp;#8221;, &amp;#8220;ret_val&amp;#8221;);&lt;br /&gt;
	write_end();&lt;/p&gt;
&lt;p&gt;	end_channel();&lt;/p&gt;
&lt;p&gt;	/* Let auditsysctl flush all data */&lt;br /&gt;
	sleep(5);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;void validate(FILE *f, struct sysctl_record *head, char *path, pid_t pid)&lt;br /&gt;
{&lt;br /&gt;
	int i, ret, reclen, bytesread, to_parse, arg_counter;&lt;br /&gt;
	struct sysctl_record *tmp, *elem;&lt;br /&gt;
	int err = -1;&lt;br /&gt;
	tokenstr_t tok;&lt;br /&gt;
	u_char *buf;&lt;br /&gt;
	u_char type = 0;&lt;br /&gt;
	FILE *fp;&lt;br /&gt;
	long control_flag;&lt;/p&gt;
&lt;p&gt;	to_parse = WAITING;&lt;br /&gt;
	arg_counter = 0;&lt;br /&gt;
	control_flag = 0;&lt;/p&gt;
&lt;p&gt;	fp = fopen(path, &amp;#8220;r&amp;#8221;);&lt;br /&gt;
	if(fp == NULL)&lt;br /&gt;
		return;&lt;/p&gt;
&lt;p&gt;	tmp = head;&lt;br /&gt;
	if(tmp == NULL)&lt;br /&gt;
		return;&lt;/p&gt;
&lt;p&gt;	while(1) {&lt;/p&gt;
&lt;p&gt;		to_parse = WAITING;&lt;br /&gt;
		if(!err || reclen == -1)&lt;br /&gt;
			break;&lt;/p&gt;
&lt;p&gt;		/* Record must begin with a header token. */&lt;br /&gt;
		do {&lt;br /&gt;
			type = fgetc(fp);&lt;br /&gt;
		} while(type != AU_HEADER_32_TOKEN);&lt;br /&gt;
		ungetc(type, fp);&lt;/p&gt;
&lt;p&gt;		while ((reclen = au_read_rec(fp, &amp;amp;buf)) != -1) {&lt;br /&gt;
			bytesread = 0;&lt;br /&gt;
			while (bytesread mib[0]);&lt;br /&gt;
						else&lt;br /&gt;
							ret = check_arg(tok.tt.arg32, tmp-&amp;gt;mib[1]);&lt;/p&gt;
&lt;p&gt;						if(!ret)&lt;br /&gt;
							report_error(tok, f);&lt;br /&gt;
						break;&lt;/p&gt;
&lt;p&gt;					case AUT_RETURN32:&lt;br /&gt;
						TOKEN_FLAG_SET(control_flag, TOKEN_RETURN);&lt;br /&gt;
						ret = check_ret(tok.tt.ret32, tmp-&amp;gt;ret, tmp-&amp;gt;err_val);&lt;br /&gt;
						if(!ret)&lt;br /&gt;
							report_error(tok, f);&lt;br /&gt;
						break;&lt;/p&gt;
&lt;p&gt;					case AUT_TRAILER:&lt;br /&gt;
						to_parse = WAITING;&lt;br /&gt;
						if(!TOKEN_FLAG_ISSET(control_flag, TOKEN_SUBJECT))&lt;br /&gt;
							report_error_string(&amp;#8221;Missing Subject token&amp;#8221;, f);&lt;br /&gt;
						if (!TOKEN_FLAG_ISSET(control_flag, TOKEN_ARG) || arg_counter != 2)&lt;br /&gt;
							report_error_string(&amp;#8221;Missing Argument token&amp;#8221;, f);&lt;br /&gt;
						if(!TOKEN_FLAG_ISSET(control_flag, TOKEN_RETURN))&lt;br /&gt;
							report_error_string(&amp;#8221;Missing Return token&amp;#8221;, f);&lt;br /&gt;
						control_flag = 0;&lt;br /&gt;
						arg_counter = 0;&lt;br /&gt;
						if(tmp-&amp;gt;next != NULL)&lt;br /&gt;
							tmp = tmp-&amp;gt;next;&lt;br /&gt;
						break;&lt;/p&gt;
&lt;p&gt;					default:&lt;br /&gt;
						break;&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;/p&gt;
&lt;p&gt;free(buf);&lt;br /&gt;
fclose(fp);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;int&lt;br /&gt;
main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
	int i, quit, fd, value, index, fdout, count;&lt;br /&gt;
	char *shared_string, *descr, path[512];&lt;br /&gt;
	pid_t pid;&lt;br /&gt;
	struct sysctl_record *head, *elem;&lt;br /&gt;
	FILE *f;&lt;/p&gt;
&lt;p&gt;	index = 0;&lt;br /&gt;
	head = NULL;&lt;/p&gt;
&lt;p&gt;	init_channel();&lt;/p&gt;
&lt;p&gt;	pid = fork();&lt;br /&gt;
	if(!pid) {&lt;br /&gt;
		sleep(15);&lt;br /&gt;
		test_sysctl();&lt;br /&gt;
	} else {&lt;br /&gt;
		fd = setup_auditpipe(pid);&lt;br /&gt;
		snprintf(path, 512, &amp;#8220;/tmp/audit-%d&amp;#8221;, pid);&lt;/p&gt;
&lt;p&gt;		fdout = open(path, O_RDWR | O_CREAT);&lt;br /&gt;
		if(fdout == -1)&lt;br /&gt;
			err(-1, &amp;#8220;OPEN&amp;#8221;);&lt;/p&gt;
&lt;p&gt;		quit = 0;&lt;br /&gt;
		while (!waitpid(pid, &amp;amp;quit, WNOHANG)) {&lt;/p&gt;
&lt;p&gt;			/* Audit pipe input. */&lt;br /&gt;
			read_auditpipe(fd, fdout);&lt;/p&gt;
&lt;p&gt;			/*&lt;br /&gt;
			 * See whether is there anything on the shared-memory,&lt;br /&gt;
			 * if so build a structure&lt;br /&gt;
			 */&lt;br /&gt;
			sem_getvalue(mutex, &amp;amp;count);&lt;br /&gt;
			if(count) {&lt;br /&gt;
				shared_string = read_string();&lt;br /&gt;
				elem = malloc(sizeof(struct sysctl_record));&lt;br /&gt;
				if(elem == NULL)&lt;br /&gt;
						err(-1, &amp;#8220;MALLOC&amp;#8221;);&lt;/p&gt;
&lt;p&gt;				while((count = parse_string(shared_string)) != -1) {&lt;br /&gt;
					descr = get_descr(shared_string);&lt;br /&gt;
					if(count == INT_TYPE) {&lt;br /&gt;
						if(!strncmp(descr, &amp;#8220;arg1&amp;#8243;, 4))&lt;br /&gt;
							elem-&amp;gt;mib[1] = get_int(shared_string);&lt;br /&gt;
						else if (!strncmp(descr, &amp;#8220;arg&amp;#8221;, 3))&lt;br /&gt;
							elem-&amp;gt;mib[0] = get_int(shared_string);&lt;br /&gt;
						else&lt;br /&gt;
							elem-&amp;gt;ret = get_int(shared_string);&lt;br /&gt;
					}&lt;br /&gt;
					else if ( count == STRING_TYPE) {&lt;br /&gt;
						snprintf(elem-&amp;gt;err_val, sizeof(elem-&amp;gt;err_val) &amp;gt;&lt;br /&gt;
								strlen(shared_string) +1 ?&lt;br /&gt;
								strlen(shared_string) +1 :&lt;br /&gt;
								sizeof(elem-&amp;gt;err_val), &amp;#8220;%s&amp;#8221;,&lt;br /&gt;
								shared_string);&lt;br /&gt;
					}&lt;br /&gt;
					shared_string = read_string();&lt;br /&gt;
				}&lt;br /&gt;
				head = add_field(head, elem);&lt;br /&gt;
				if(head == NULL)&lt;br /&gt;
					err(-1, &amp;#8220;List error&amp;#8221;);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	close_auditpipe(fd, fdout);&lt;br /&gt;
	end_channel();&lt;br /&gt;
	f = init_log(pid);&lt;br /&gt;
	validate(f, head, path, pid);&lt;br /&gt;
	fclose(f);&lt;br /&gt;
	return (0);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;As you might see, the validate() function will compare records against collected data, whereas the test_sysctl() will send &#160;to the parent, using shared memory, information regarding the events. You might see a sort of &#160;&amp;#8221;API&amp;#8221; here, those functions were provided in order to ease tests writing. They are somehow commented, so you might find useful to take a look at the code.&#160;I wrote tests for 20 events, but theoretically they are 500+, so we need your help. As usual if you have any kind of suggestions or comments feel free to contact me.&#160;Here: http://www1.autistici.org/snagg/final.zip you can find the whole code.&#160;&#160;Cheers,Snagg&#160;&lt;/p&gt;</content>
		<author>
			<name>snagg</name>
			<uri>http://blogs.freebsdish.org/snagg</uri>
		</author>
	</entry>

	<entry>
		<title>Anders Nore: Nearing end, call for testers</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/andenore/2008/08/16/nearing-end-call-for-testers/"/>
		<id>http://blogs.freebsdish.org/andenore/2008/08/16/nearing-end-call-for-testers/</id>
		<updated>2008-08-16T17:50:36+00:00</updated>
		<content type="html">&lt;p&gt;Hi, it&amp;#8217;s nearing the end of GSoC 2008 and I&amp;#8217;ve updated my wiki ( http://wiki.freebsd.org/AndersNore/pkg_improved ) about the pkg_improved project and there are testing instructions for those brave enough. Please test and please report bugs. There are several new features to the pkg-tools and there are some speed improvements made. Lately I&amp;#8217;ve been cleaning some of the code mostly fixing bugs and writing documentation in the form of man-pages.&lt;/p&gt;</content>
		<author>
			<name>andenore</name>
			<uri>http://blogs.freebsdish.org/andenore</uri>
		</author>
	</entry>

	<entry>
		<title>Przemek Witaszczyk</title>
		<link rel="alternate" type="text/html" href="http://bitbay.blogspot.com/2008/08/ive-tried-to-find-differences-between.html"/>
		<id>tag:blogger.com,1999:blog-6454200798774615510.post-1726951362836065456</id>
		<updated>2008-08-16T06:32:00+00:00</updated>
		<content type="html">I've tried to find the differences between the contexts of calling openfirmware()&lt;br /&gt;from OF_write()/OF_read() and OF_peer(), but I found none. It's not possible&lt;br /&gt;to break into the fwentry() call from openfirmware(), since it always results in&lt;br /&gt;spinlock corrupt crash. &#160;I've tried to insert the call to decr_init() into several&lt;br /&gt;boot subsystems, it always ended with the same crash, even before the VM init.&lt;br /&gt;I've also called the OF_peer() at the very beginning of OF_write() to see if it's&lt;br /&gt;possible to execute it at the very early stage of the boot, before the KDB entry.&lt;br /&gt;It crashed. I've also tried to switch off the decr_init() call in the cpu_starup() and the system passed several following subsystems to subsystem 3000000 (or so) and crashed in the same way it does with decr_init().&lt;br /&gt;I've inspected what does the ofw_stack() function do, but it only copies the current call stack to the firmware stack located in locore.S. This call was added in OF_read()/write() to make them work on Efika. Now, I can guess it's something with what could have change in p4 FBSD vs FBSD 6.x, since the patch was for that version. I'll try to apply the patch to version 6.x. Also, I'll have a look at the NetBSD source. I really don't understand, why it does work work the OF_read()/OF_write() and does not for OF_peer(), since those calls are so similar.</content>
		<author>
			<name>vi0 (noreply@blogger.com)</name>
			<uri>http://bitbay.blogspot.com/</uri>
		</author>
	</entry>

	<entry>
		<title>Przemek Witaszczyk: still no luck, and a new problem</title>
		<link rel="alternate" type="text/html" href="http://bitbay.blogspot.com/2008/08/still-no-luck-and-new-problem.html"/>
		<id>tag:blogger.com,1999:blog-6454200798774615510.post-5887681693398099028</id>
		<updated>2008-08-08T15:28:00+00:00</updated>
		<content type="html">I've performed lots of experiments with the ofwreal.S and locore.S&lt;br /&gt;sources in aim to try to remove the problem with the stack.&lt;br /&gt;It does't work for now, but I've managed to overcome that by utilizing&lt;br /&gt;some free registers. Now I've encountered yet another problem - the&lt;br /&gt;kernel now crashes on the openfirmware entry in the fwentry(). It's probably&lt;br /&gt;coused by a wrong address of the entry point, coming from the virtual&lt;br /&gt;instead of the real addressing.  Here's the crash site:&lt;br /&gt;=============&lt;br /&gt;cpu_exception:&lt;br /&gt;SRR0 0x00000000 SRR1  0x00083030 MSR  0x00003030&lt;br /&gt;LR   0x004A0E70 CTR   0x00000000 CR   0x44002082   XER 0x20000000&lt;br /&gt;=============&lt;br /&gt;I've made a small test by changing the address the firmware entry is supposed to&lt;br /&gt;be at and I get slightly similar crash:&lt;br /&gt;=============&lt;br /&gt;cpu_exception:&lt;br /&gt;SRR0 0x01003ED8 SRR1  0x00003030 MSR  0x00003030&lt;br /&gt;LR   0x004A0E70 CTR   0x00000000 CR   0x44002044   XER 0x0&lt;br /&gt;=============&lt;br /&gt;The LR's point to the same location, the very next instrucion after  branch to OF.&lt;br /&gt;So I suppose it's the OF address, not just the argument addresing&lt;br /&gt;that is responsible at the moment. I'm trying to find out how to translate an&lt;br /&gt;address to the real mode. All help would be greatly appreciated...:)</content>
		<author>
			<name>vi0 (noreply@blogger.com)</name>
			<uri>http://bitbay.blogspot.com/</uri>
		</author>
	</entry>

	<entry>
		<title>Konrad Jankowski: Enter Libc</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/konrad/2008/08/05/enter-libc/"/>
		<id>http://blogs.freebsdish.org/konrad/2008/08/05/enter-libc/</id>
		<updated>2008-08-05T11:55:39+00:00</updated>
		<content type="html">&lt;p&gt;I spend last weeks on importing interesting parts of Apple&amp;#8217;s libc to FreeBSD. I ended up with this patch: http://versus.ath.cx/patches/fbsd_7.0_collation.patch, which I than applied to the CURRENT libc, and commited as my p4 libc branch.&lt;/p&gt;
&lt;p&gt;It wasn&amp;#8217;t however without accident - I suffered two serious laptop breakages, ending with en essentially dead one. First the display broke down - stopped showing anything - I think it was the backlight. I was lucky - I had external monitor enabled and configured for Dual Head. When I connected it however, I started to get IDE timeout problems when booting FreeBSD. So my hard drive also died. I managed to boot off live-cd, and copy and my gsoc data, and that was it.&lt;/p&gt;
&lt;p&gt;After installing everything on my new-bought laptop, I got to finishing my work on libc, and was able to get in into - I think - fully working state. There are still some little things I want to fix/enhance, but general functionality is there.&lt;/p&gt;
&lt;p&gt;Now I&amp;#8217;m focusing on writing regression tests, than will come manpages. At the end will be a call for testers.&lt;/p&gt;</content>
		<author>
			<name>konrad</name>
			<uri>http://blogs.freebsdish.org/konrad</uri>
		</author>
	</entry>

	<entry>
		<title>Ryan French: Weekly Report - 4/8/08</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/rfrench/2008/08/03/weekly-report-4808/"/>
		<id>http://blogs.freebsdish.org/rfrench/2008/08/03/weekly-report-4808/</id>
		<updated>2008-08-03T23:52:07+00:00</updated>
		<content type="html">&lt;p&gt;I managed to get a few things done this week which and spend a few hours going over FreeBSD networking code and making changes to my own code. I am very close to being able to get the basics of MPLS going, and once that is done the more advanced features will actually be a bit easier as I have the Ayame project to reference those off, whereas at the moment I have no real reference material on how to integrate my MPLS code with the FreeBSD networking code. As I said last week, if anyone has any advice or experience on how to get netisr calling my MPLS code, I think I almost have it, but it would be hugely appreciated as it will save me precious time that I dont really have. I realised this weekend that there is only a month till the end of the Summer of Code, at which point I really need to have at least simple sending/receiving and basic label switching going. Luckily, I am also doing this project as a dissertation for my Post Graduate Diploma in Computer Science this year, so I will be working on it for at elast another month after the summer of code stuff has finished, and I plan on getting a fully working implementation of MPLS going for FreeBSD eventually by completing it once I leave university.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accomplished Last Week:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- Went through the FreeBSD networking code, trying to figure out where abouts the actual call to the protocol initialising functions are made. It&amp;#8217;s not as easy as you would think for someone with almost no previous Operating System code experience to look at this stuff and try and figure it all out, but I&amp;#8217;m getting there.&lt;/p&gt;
&lt;p&gt;- Made some changes to my own code to use the FreeBSD specific networking routines, rather than the OpenBSD ones, particularly involving if_ethersubr.c and the netisr files.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plans for Next Week:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- Finally finish figuring out where I am to call the mplsinitr function and getting the protocol registered with netisr. I&amp;#8217;ve said this many times before, and&#160; it keeps elluding me, but basically once this is done then the protocol will have a basic functionality and I can actually be semi-happy with the work I have accomplished.&lt;/p&gt;
&lt;p&gt;- Figure out what feature is more important to concentrate on next. With so little time remaining in the GSoC I am wanting to make sure I have gotten as many features of the protocol implemented as I can, but I want to make sure I have all the key features that I need implemented as well.&lt;/p&gt;</content>
		<author>
			<name>Ryan French</name>
			<uri>http://blogs.freebsdish.org/rfrench</uri>
		</author>
	</entry>

	<entry>
		<title>Anders Nore: New pkg_info -M (installtime comparison)</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/andenore/2008/08/03/new-pkg_info-m-installtime-comparison/"/>
		<id>http://blogs.freebsdish.org/andenore/2008/08/03/new-pkg_info-m-installtime-comparison/</id>
		<updated>2008-08-03T22:23:06+00:00</updated>
		<content type="html">&lt;p&gt;Now the new date feature is doing something useful, I&amp;#8217;ve added an option (-M) to pkg_info which compares installtimes of packages similar to the comparison of versions. So now you can do &amp;#8220;pkg_info -M &amp;#8216;*&amp;gt;2008 07 18&amp;#8242; &amp;#8221; and it will display all pacakges installed after the date YYYY MM DD, you can also use the -x or -X option with the -M option. I&amp;#8217;m also planning to make use of this in pkg_delete so you can delete packages within date-ranges. Also pkg_convert will have an option so you can make the installtime of packages (who do not have a @comment DATE field) equal e.g., to the changetime of +DESC in /var/db/pkg/pkgname/ (which is correct for most packages). I&amp;#8217;ve also decided to cache the installtime which makes this operation a lot faster than calling read_plist for every package to find the installtime.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve also done some improvements to the &amp;#8216;pkg_add -r&amp;#8217; progress indication output, which now displays the speed of the download as well as percentage progress.&lt;/p&gt;</content>
		<author>
			<name>andenore</name>
			<uri>http://blogs.freebsdish.org/andenore</uri>
		</author>
	</entry>

	<entry>
		<title>Przemek Witaszczyk: hard progress</title>
		<link rel="alternate" type="text/html" href="http://bitbay.blogspot.com/2008/08/hard-progress.html"/>
		<id>tag:blogger.com,1999:blog-6454200798774615510.post-4010509782318405583</id>
		<updated>2008-08-01T07:29:00+00:00</updated>
		<content type="html">&lt;p&gt;Eventually, with the aid of my mentor, we found the exact position of the faulting instruction. I've managet to turn on the KDB facility and thus we were able to make some breakpoints. In aim to spot the bug we used the DAR register content and toolchan version of the objdump tool. &#160;Fortunately, it appeared that addresses obtained from the objdump and those from the running kernel match. Here's the dump: &lt;/p&gt;&lt;p&gt;====================================================================&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;SRR0 0x004A0D10 SRR1 0x00003030 MSR 0x00003030&lt;br /&gt;LR 0x01003ED8 CTR 0x00000000 CR 0x24002044 XER 0x0&lt;br /&gt;DAR 0xD0004D3C DSISR 0x42000000 Type 3&lt;br /&gt;GPR[] 0x004A0BC4 0xD0004D30 0x00000000 0x01003ED8 0x00003030 0x00000000 0x00000020 0x00000000&lt;br /&gt;...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;====================================================================&lt;/p&gt;&lt;p&gt;The evil instrucion is in the openfirmware entry point wrapper,&lt;/p&gt;&lt;p&gt;====================================================================&lt;/p&gt;&lt;p&gt;ofwreal.S&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;/*&lt;br /&gt;&#160;* Emulated firmware entry.&lt;br /&gt;&#160;*/&lt;br /&gt;fwentry:&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&#160;lis     %r3,clsave@ha           &#160; /* save mmu values of client */&lt;br /&gt;&#160;       addi    %r3,%r3,clsave@l       &lt;br /&gt;&#160;       lis     %r3,fwsave@ha           /* restore mmu values of firmware */&lt;br /&gt;&#160;       addi    %r3,%r3,fwsave@l&lt;br /&gt;&#160;       bl      restoremmu &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&#160;       lis     %r3,ofentry@ha&lt;br /&gt;&#160;       lwz     %r3,ofentry@l(%r3)      /* get actual firmware entry */&lt;br /&gt;&#160;       mtlr    %r3&lt;br /&gt;&lt;br /&gt;&#160;       mfmsr   %r4                    &lt;br /&gt;&#160;       stw     %r4,12(%r1)             /* save MSR */&lt;br /&gt;&#160;       ori     %r4,%r4,PSL_IR|PSL_DR   /* turn on MMU */&lt;br /&gt;&#160;       andi.   %r4,%r4,~PSL_EE@l       /* turn off interrupts */&lt;br /&gt;&#160;       mtmsr   %r4&lt;br /&gt;&#160;       isync&lt;br /&gt;&lt;br /&gt;====================================================================&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The problem is with the stack,&lt;/p&gt;&lt;p&gt;stw     %r4,12(%r1)             /* save MSR */&lt;/p&gt;&lt;p&gt;That line causes probably a DSI exception. The problem is that it crashes just after the restoremmu function branch. If one stores something on the stuck before that branch, ther's no crash. So the problem lies in the restoremmu function, but it's not clear to me where exactly it is, because the restoremmu does not operate the %r1 register explicitly.&lt;/p&gt;</content>
		<author>
			<name>vi0 (noreply@blogger.com)</name>
			<uri>http://bitbay.blogspot.com/</uri>
		</author>
	</entry>

	<entry>
		<title>Gleb Kurtsou: Layer2 filtering in pf</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/gleb/2008/07/30/layer2-filtering-in-pf/"/>
		<id>http://blogs.freebsdish.org/gleb/2008/07/30/layer2-filtering-in-pf/</id>
		<updated>2008-07-30T10:16:34+00:00</updated>
		<content type="html">&lt;p&gt;Instead of trying to describe all the changes regarding layer2 filtering in pf I&amp;#8217;d better provide some examples.&lt;/p&gt;
&lt;p&gt;Ethernet address can be specified for host or interface name:&lt;br /&gt;
&lt;code&gt;pass in on bridge0 from 10.0.0.1 ether 00:11:11:11:11:11 to 10.0.0.2 ether 00:22:22:22:22:22&lt;br /&gt;
pass in on bridge0 from ($int_if:network) ether 00:11:11:11:11:11 to any&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Ethernet addresses are supported in table entries:&lt;br /&gt;
&lt;code&gt;table &amp;lt;test&amp;gt; persist {10.0.0.1 ether 00:11:11:11:11:11, 10.0.0.2 ether 00:22:22:22:22:22}&lt;br /&gt;
pass on bridge0 from &amp;lt;test&amp;gt; to &amp;lt;test&amp;gt; keep state (ether)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Ethernet stateful filtering is handled specially.  Per rule flag is added to conditionally enable ethernet stateful filtering (disabled by default):&lt;br /&gt;
&lt;code&gt;pass log on bridge0 from &amp;lt;test&amp;gt; to &amp;lt;test&amp;gt; keep state (ether)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;With &lt;i&gt;keep state (ether)&lt;/i&gt; enabled pf uses real source and destination ethernet addresses from the first packet to create the state and uses these addresses afterwards to match the state.&lt;/p&gt;</content>
		<author>
			<name>gleb</name>
			<uri>http://blogs.freebsdish.org/gleb</uri>
		</author>
	</entry>

	<entry>
		<title>G&#225;bor K&#246;vesd&#225;n: BSD grep - Part 2</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/gabor/2008/07/28/bsd-grep-part-2/"/>
		<id>http://blogs.freebsdish.org/gabor/2008/07/28/bsd-grep-part-2/</id>
		<updated>2008-07-28T15:30:00+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;ve fixed the known issues with &lt;span class=&quot;caps&quot;&gt;BSD&lt;/span&gt; grep and rewritten some parts as my mentors suggested. Now I&amp;#8217;m waiting for his answer about the current code and if he thinks it&amp;#8217;s ok, I&amp;#8217;ll submit it to portmgr@ for a thorough test. The last time grep failed on pointyhat due to a bug in -v.&lt;/p&gt;

	&lt;p&gt;As for &lt;span class=&quot;caps&quot;&gt;BSD&lt;/span&gt; diff, I have completed some features, but still there are various to implement. The current status can be seen &lt;a href=&quot;http://wiki.freebsd.org/G%C3%A1borSoC2008&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Gabor Kovesdan</name>
			<uri>http://blogs.freebsdish.org/gabor</uri>
		</author>
	</entry>

	<entry>
		<title>Rui Paulo: tcpad status report #3</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/rpaulo/2008/07/28/tcpad-status-report-3/"/>
		<id>http://blogs.freebsdish.org/rpaulo/2008/07/28/tcpad-status-report-3/</id>
		<updated>2008-07-28T12:56:15+00:00</updated>
		<content type="html">&lt;p&gt;So, I&amp;#8217;ve been offline for some days now and I&amp;#8217;ll continue to be until the end of the month. Development of tcpad is going fine and I just committed a few days of work into Perforce. This new work includes parsing of the TCP options and further SEQ/ACK analysis.&lt;br /&gt;
SEQ/ACK analysis is probably the most challenging task of this project, so it hasn&amp;#8217;t been finished yet.&lt;br /&gt;
The good news is that I&amp;#8217;m learning a lot about TCP and its extensions and it&amp;#8217;s being thrilling!&lt;br /&gt;
&lt;br /&gt;
In other news, my TCP ECN work will most likely be committed to FreeBSD-CURRENT RSN. &lt;img src=&quot;http://blogs.freebsdish.org/rpaulo/wp-includes/images/smilies/icon_wink.gif&quot; alt=&quot;;-)&quot; class=&quot;wp-smiley&quot; /&gt;&lt;/p&gt;</content>
		<author>
			<name>Rui Paulo</name>
			<uri>http://blogs.freebsdish.org/rpaulo</uri>
		</author>
	</entry>

	<entry>
		<title>Ryan French: Weekly Report - 24/7/08</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/rfrench/2008/07/24/weekly-report-24708/"/>
		<id>http://blogs.freebsdish.org/rfrench/2008/07/24/weekly-report-24708/</id>
		<updated>2008-07-24T00:13:17+00:00</updated>
		<content type="html">&lt;p&gt;So university is already in it&amp;#8217;s second week down here in New Zealand, and things are already getting underway, with my first assignment due today. I&amp;#8217;m taking some &amp;#8220;interesting&amp;#8221; papers this semester. Operating Systems will be really good, as we are learning how to write Linux modules, and we in fact are going to write a file system for Waikato Universities &amp;#8220;unique&amp;#8221; cluster computer (it has been described as just an office network running fancy software, and in fact it is pretty much just a bunch of Dell computers on an ethernet network), with the main focus being something that supports migration from one node&amp;#8217;s hard drive to another. Advanced Communications may or may not actually help me in the real world, I&amp;#8217;m not sure, but it&amp;#8217;s all just to do with carrier networks and setting up/maintaining a network in a workplace or ISP. For fun I decided my last paper to be &amp;#8220;Graphics and Computer Games&amp;#8221;, which focuses more on graphics than anything, using C# and Microsofts (sorry for saying a dirty word) XNA package. Sadly, I&amp;#8217;m actually already a huge fan of XNA after only a week. I&amp;#8217;ve already gone from no previous knowledge to having 3D models loaded on the screen and letting the user control the camera. Yes its that easy.&lt;/p&gt;
&lt;p&gt;The Goggle Summer of Code midterm evaluations have been completed, and I passed, despite being able to work much on MPLS for the past while, and not being as far through the project as I had hoped, but thanks to the money I have now been able to cut 2 or 3 days a week off my work at the liquor store, so I can concentrate more on getting this project working. Also, I got myself a 26&amp;#8243; Viewsonic screen.&lt;/p&gt;
&lt;p&gt;On to the report.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accomplished Last Week:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- With the normal start of semester stuff going on I wasnt able to do much more on MPLS, other than try to sort out where I am supposed to call my mplsintr function from. In OpenBSD this is done directly inside netisr, but in FreeBSD this is not the case. If anyone has any ideas on this please leave a comment as it would save me a lot of time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plans for Next Week:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&#160;&lt;/strong&gt;- I have the next 2 days off with no work and no uni, so depending on how much work my lecturers gve me today I will have at least 1 full day to work on MPLS. I am hoping to figure out the netisr problem and have the port completely finished by Sunday.&lt;/p&gt;
&lt;p&gt;- Work out my next step and where the port has left me. As far as I can tell, once the port from OpenBSD is done I will be able to send and receive MPLS packets, and switch the label based on a table that is manually setup using the route command. From there I would like to look at setting up automatic route table stuff, using Ayame&amp;#8217;s MPLS-TE code as a basis, but it might turn out that there are more pressing features of MPLS that need my attention.&lt;/p&gt;</content>
		<author>
			<name>Ryan French</name>
			<uri>http://blogs.freebsdish.org/rfrench</uri>
		</author>
	</entry>

	<entry>
		<title>Anders Nore: New features</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/andenore/2008/07/21/new-features/"/>
		<id>http://blogs.freebsdish.org/andenore/2008/07/21/new-features/</id>
		<updated>2008-07-21T17:56:42+00:00</updated>
		<content type="html">&lt;p&gt;Hello, it&amp;#8217;s been a while since I&amp;#8217;ve updated my blog and it was about time. I&amp;#8217;ve come back from my vacation this week and I have added two new features to pkg_improved which I think are nice features to have.&lt;/p&gt;
&lt;p&gt;The first feature is that pkg_add registers the installation time (seconds-since-epoch) in +CONTENTS as a &amp;#8220;@comment DATE: 123124124&amp;#8243;, pkg_info can then see the installation dates of installed ports with the new -n option (for viewing the date in human readable form) or with the -N option (prints out seconds-since-epoch). The reason why I added this is because I&amp;#8217;ve seen people ask how they can get the installation time of packages, and in my opinion I don&amp;#8217;t think that the filesystem should be the only holder of such information (e.g. fetching modification time of files contained in /var/db/pkg/*).&lt;/p&gt;
&lt;p&gt;The second feature is dependency fixing (I&amp;#8217;ve seen that portmaster does this), and what it does is to reconstruct the +REQUIRED_BY file for packages being installed with pkg_add or when pkg_create -O option is called from ports. In detail it checks every installed package for a @pkgdep that matches the installing package it add&amp;#8217;s it to the installing package +REQUIRED_BY file. This slows down pkg_add somewhat but I think this should be the correct behaviour for pkg_add.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve also added a percentage progress status to pkg_add -r (remote fetching packages). You can see instructions for testing the improved tools on my blog: http://wiki.freebsd.org/AndersNore/pkg_improved&lt;/p&gt;</content>
		<author>
			<name>andenore</name>
			<uri>http://blogs.freebsdish.org/andenore</uri>
		</author>
	</entry>

	<entry>
		<title>Ryan French: Weekly Report - 17/7/08</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/rfrench/2008/07/16/weekly-report-17708/"/>
		<id>http://blogs.freebsdish.org/rfrench/2008/07/16/weekly-report-17708/</id>
		<updated>2008-07-16T23:42:43+00:00</updated>
		<content type="html">&lt;p&gt;Haven&amp;#8217;t done one of these for the past two weeks, due to a very hectic holiday travelling to a few different places to catch up with friends and family while I still had a chance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accomplished Last Week:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- Began porting over the Ayame/OpenBSD code to FreeBSD. The problem I&amp;#8217;ve come across at the moment is in the differences between OpenBSD and FreeBSD in terms of the netisr stuff. I&amp;#8217;m looking into at the moment and should hopefully have it done soon.&lt;/p&gt;
&lt;p&gt;- Turned 24. For those of you who know me, you&amp;#8217;ll realise that it was quite an accomplishment for me to make it this far through my life and still be alive.&lt;/p&gt;
&lt;p&gt;- GSoC midterm evaluations were submitted, only 6 weeks left in the program.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plans for this week:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- University has started up again for me, and its straight back into it. Luckily it looks like I&amp;#8217;m going to be able to work a few less days a week thanks to my GSoC money and having my work employ a few new people, so I should be able to devote a few more days a week to MPLS.&lt;/p&gt;
&lt;p&gt;- Finish porting over the OpenBSD code. This will mean I will be able to send and receive MPLS packets, using labels that can be manually entered using the route command. I have to still look into the code a bit more to decipher if the label switching is doing everything I was planning on implementing with it.&lt;/p&gt;</content>
		<author>
			<name>Ryan French</name>
			<uri>http://blogs.freebsdish.org/rfrench</uri>
		</author>
	</entry>

	<entry>
		<title>Konrad Jankowski: Reinforcements from Apple</title>
		<link rel="alternate" type="text/html" href="http://blogs.freebsdish.org/konrad/2008/07/12/reinforcements-from-apple/"/>
		<id>http://blogs.freebsdish.org/konrad/2008/07/12/reinforcements-from-apple/</id>
		<updated>2008-07-12T15:45:36+00:00</updated>
		<content type="html">&lt;p&gt;Last time I said that it would be nice to use some Apple&amp;#8217;s work in the area of collation. I exchanged a few emails with Jordan K. Hubbard and it seems we can user their code without problems - all interesting parts are still on the BSD licence. That&amp;#8217;s because this is  still our code, only extended by Apple. Even the copyrights weren&amp;#8217;t changed a bit (so we don&amp;#8217;t know who did the extending).&lt;/p&gt;
&lt;p&gt;Anyway, as the code is fairly mature, I decided to use it. The libc part of the code is the one I am most interested in, but to see how it works, I first had to port the userland tool - Apple&amp;#8217;s version of colldef. Doing this I extended it a little - to not choke on the expansions. As I don&amp;#8217;t have the locale data that Apple is using, I made the tool work on my data - at the same time making it more posix compliant. There were many little issues while porting the code - and I wanted it to work perfectly before I submitted it - so it took me more than a week to complete the porting. I even made it compile with &amp;#8220;-ansi -Wall -Wextra -pedantic&amp;#8221;, thing I always do with my code.&lt;/p&gt;
&lt;p&gt;Now, as the tool is completed and I did a final cleanup, I will test it on a bigger amount of data, and then proceed to port the libc part. I&amp;#8217;m really excited to see how it works. When those two things are completed I will have to make a few more extensions to Apple&amp;#8217;s code to make if fully compliant with UCA.&lt;/p&gt;</content>
		<author>
			<name>konrad</name>
			<uri>http://blogs.freebsdish.org/konrad</uri>
		</author>
	</entry>

</feed>
