From: Nico Coesel on 3 May 2010 20:16 Jan Panteltje <pNaonStpealmtje(a)yahoo.com> wrote: >On a sunny day (Mon, 03 May 2010 20:42:19 GMT) it happened nico(a)puntnl.niks >(Nico Coesel) wrote in <4bdf34c4.818957468(a)news.planet.nl>: > >>Jan Panteltje <pNaonStpealmtje(a)yahoo.com> wrote: >> >>>Wanted to test a Microchip ENC28J60 ethernet controller chip. >>>That chip is 3.3V and 5 V tolerant. >>>So decided to test on the PC par port first. >>>Ended up writing a complete UDP ARP subsystem in C, >>>this will add ethernet for next to nothing to anything that has an 8 bits port. >>> http://panteltje.com/panteltje/jppecat/ >>> >>>Those who know netcat will see I wrote a netcat clone on top of the UDP layer. >> >>You could have used uIP. That would have saved you a lot of work. I >>managed to run uIP on top of the libpcap libraries to test embedded IP >>appliances on a PC. > >No idea what uIP is, this uses no libraries, and is 100% copyright mine. >It is a powerful building block for further projects, >as now for ethernet connectivity you no longer need an OS! That is exactly what uIP is about (also free to use for any purpose). Why re-invent the wheel? Libpcap is just handy to test your application on a PC platform. Libpcap actually makes a raw connection to the ethernet card like your own application has its own network card. -- Failure does not prove something is impossible, failure simply indicates you are not using the right tools... nico(a)nctdevpuntnl (punt=.) --------------------------------------------------------------
From: Jan Panteltje on 4 May 2010 08:36 On a sunny day (Tue, 04 May 2010 00:16:37 GMT) it happened nico(a)puntnl.niks (Nico Coesel) wrote in <4bdf6693.831708187(a)news.planet.nl>: >>No idea what uIP is, this uses no libraries, and is 100% copyright mine. >>It is a powerful building block for further projects, >>as now for ethernet connectivity you no longer need an OS! > >That is exactly what uIP is about (also free to use for any purpose). >Why re-invent the wheel? Libpcap is just handy to test your >application on a PC platform. Libpcap actually makes a raw connection >to the ethernet card like your own application has its own network >card. OK, so maybe same idea, that leaves you to write a driver for the ENC28J60. Once you have the driver, the layers on top of that, in a OS independent way, are a natural thing to also write. I have made millions (no kidding) for my bosses in the long ago past by being able to write from the 'silicon level upward' anything that is not bloat, does exactly what you want, The understanding of the matter is the reward, and the power it gives you is priceless. I have seen too many libraries used, from kde bloat to SDL, to whatever, to solve problems you can solve with just a few hundred lines of code if you know the details. I am not critisizing anybody for using libraries, I use those a lot, but I want *me personally* to know every gory detail of the stuff I am using, for example so I can do everything everybody else cannot do. This jppecat is cute, what it reads from stdin, comes out at the destination IP, and what comes from the destination IP goes to stdout. Of course with the Linux OS code 'main'. There are some routines in it, like that in 'listen' and send_udp_data() that can be called from any application, OS or not. It is just fun to write, only limited by the imagination. If you type at one end (10.0.0.150): netcat -l -p 1024 and at the other end jppecat -i 10.0.0.150 -p 1024 -v Anything you type shows up at 10.0.0.150 hehe I have send quite long files, and then did a diff with the originals, zero errors. Amazes me, as I have seen lots of errors with UDP streaming in the past. There is more stuff that needs to be added, this is only version 0.1, at least it is a decent driver for the ENC28J60. <spel sjeker has detected errrror, pleaze rebood.>
First
|
Prev
|
Pages: 1 2 Prev: CPU benchmarks Next: .DC Spice Analysis Quirk... Anyone Know How to Do This? |