Hi, Darren.

It is so wonderful!
I think the following makefile is useful when using Sun Studio and
amd64 CPU.

all:
        cc  -m64 -xmodel=kernel -c -D_KERNEL -I . sink.c
        ld -r -dy -N misc/mac -o sink sink.o

install:
        cp sink /usr/kernel/drv/amd64
        cp sink.conf /usr/kernel/drv
        add_drv sink

uninstall:
        rm /usr/kernel/drv/amd64/sink
        rm /usr/kernel/drv/sink.conf
        rem_drv sink

It is a good idea to write a book named Solaris Device Drivers :-)

Thanks,
Chris

Darren Reed wrote:
> Over the past few weeks, I've been experimenting with trying to
> write a simple software-only network interface to do something
> trivial: discard all packets.
>
> The .tar.gz file below contains source code that can be compiled up
> to form the "sink" driver *BUT* it currently requires that you have
> the source code for your opensolaris install "somewhere" so that
> you can copy in the correct mac.h and dld.h files.
>
> So why would you use it?
> If you route packets to sink0, they will be discarded but you can
> also use snoop/tcpdump on the interface.
>
> Well, I suppose it is a bit silly to do that, but I think it's worthwhile
> as something to look at if you've got thoughts about developing more
> sophisticated network interfaces that exist only in software.
>
> http://www.opensolaris.org/os/community/networking/files/sink.tar.gz
>
> Have fun,
> Darren
>
> _______________________________________________
> networking-discuss mailing list
> [email protected]
>   

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to