Re: network programming



Andrew Reilly <andrew-newspost@xxxxxxxxxxxxxxxxxxxxx> writes:

On Wed, 12 Dec 2007 05:52:40 +0100, Andreas Davour wrote:

Depends on what you want to do. Some libraries don't support "raw"
packets so if you need them you may have to use FFI to access the OS
API. However, only applications that need to monitor or control
networks at the link layer need to use raw packets. Virtually all
other applications can make due with IP datagrams or TCP streams.

That would be the reason to have the underlaying level written in
something more sensible than C, to not be dependant on FFI.

But, I guess I will not use raw packets soon anyway.

Inventing new protocols on the packet/datagram level you would actually
get by with "raw" packets?

There's also the issue of multiplexing/demultiplexing packets to
applications, in a multi-tasking operating system. Below the socket
layer you really want to be in the operating system, so that you can pass
packets to the applications that are waiting for them. (You might want
to have a look at how the Minix3 network stack works: it doesn't use the
Berkeley Sockets model: network connections appear in the filesystem name
space, where regular file operations work on them.)

I knew there was interesting things going on in Minix3. Thanks for
reminding me of that.

/Andreas

--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.



Relevant Pages

  • Re: Stoppong Kazaa With Trustix
    ... STOP FILE-SHARING APPLICATIONS ON YOUR NETWORK ... inbound/outbound packets at the network level. ... match protocol fasttrack ...
    (comp.security.firewalls)
  • Re: tcp hostcache and ip fastforward for review
    ... > All in all I don't think it is worth adding this complexity. ... >> web applications that are using small HTTP requests (pipelined inside ... > Do you think such applications manage to send 1000 packets per second ... > the patch to just report the fact instead of dropping the connection. ...
    (freebsd-current)
  • Re: tcp hostcache and ip fastforward for review
    ... > All in all I don't think it is worth adding this complexity. ... >> web applications that are using small HTTP requests (pipelined inside ... > Do you think such applications manage to send 1000 packets per second ... > the patch to just report the fact instead of dropping the connection. ...
    (freebsd-net)
  • Associate network packets with application
    ... I need to alter TOS field of packets sent by specific applications. ... NDIS layer, maybe there is a possibility of checking somewhere higher, ... I need information about udp and tcp ports and ip addreses. ...
    (microsoft.public.pocketpc.developer.networking)
  • Re: Lowering CPU usage of a process
    ... and so on) so possible to hook function which do main work ... > packets to sockets of all other applications even if those applications ... > delivery threads will not be given the time slice they need to deliver the ...
    (microsoft.public.win32.programmer.kernel)