Does TinyOS provide support for the UDP protocol ?
We are trying to create an IP Phone using a Micro-controller and were thinking of installing TinyOS on it.
Any help is appreciated!
TinyOS has an IP stack (6lowPan) called BLIP which supports UDP and TCP although I have never used BLIP personally. See the link HERE for more information. A good point to start would be to look at the UDP-echo application in apps folder of the TinyOS distribution.
Related
I need to create a program that sends messages, using SCTP, from host A to host B.
The problem is... I don't know how do run this program. How can I, using language C, send messages from one host to another.
Any vague answer is welcomed.
SCTP is a transport layer protocol, and the operating system has built-in transport layer protocols, including SCTP and you get to choose what protocol it uses.
But I think here is what you're looking for: http://simplestcodings.blogspot.com/2010/08/sctp-server-client-implementation-in-c.html
a demo implementation of SCTP above tcp/ip.
I am trying to make a software that would use computers in my local subnet who are also using the same software that I am making. Regarding this, I want to know how I should scan my device to find 1) devices in my local subnet, 2) devices in my local subnet that is using the software? Any idea on this will be appreciated.
Thanks in advance.
OS? Programming language?
For Windows and C#/VB you can use this example.
In general, all instances of your program should start listeners on some IP port.
Every listener waits a request, then sends an answer.
To locate all instances in local network your program must send broadcast request to the same port and wait for answers.
You can google example of UDP broadcasting for your platform (OS and programming language) for more details.
I want to simulate tcp/ip network protocol so that I can debug it and learn how it works.I just want to implement a small part of it,but I don't know how to start,what should I do ?
Any help will be grateful...
Learning NS-2 would be a good start: http://www.isi.edu/nsnam/ns/ . This is a popular simulator that is widely used in research/academics and has a rich collection of TCP congestion protocols.
I am writing a simple OS with the network feature. But i don't know how to begin the networt part. the Linux Device Driver is not easy to read.
Could you give me some matearials or suggestions?
Take a look at lwIP - A Lightweight TCP/IP stack. It implements all necessary functionality to send/receive UDP datagrams and to establish TCP connections.
lwIP is licenced under the BSD licence, so you may use it even in non-opensource project.
Could i inject packets to Linux TCP stack without modifying the ethernet driver? Could i do this with using a library or sth ?
Thank you,
If by 'inject packets to Linux TCP stack' you mean send some data that the Linux kernel will treat as a frame coming from an Ethernet interface then you can use a 'tap' device. If an IP packet (layer 3) is good enough, then use a 'tun' device.
http://en.wikipedia.org/wiki/TUN/TAP
http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/networking/tuntap.txt
Libnet
Libnet is a generic networking API that provides access to several protocols. It is not designed as a 'all in one' solution to networking. Currently many features that are common in some network protocols are not available with Libnet, such as streaming via TCP/IP. We feel that Libnet should not provide specific features that are possible in other protocols. If we restrict Libnet to the minimal needed to communicate (datagram/packets) then this allows it to support more interfaces.
Otherwise, if you're just wondering about injecting hand-crafted packets into the network, read the man pages and look for online help with raw sockets. Some good places to start are man 7 raw, man packet, and there are some ok tutorials at security-freak.net, though the code there is not written particularly well for my tastes.