Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #8347 > unrolled thread
| Started by | Ilias Abrams <iliasabrams@gmail.com> |
|---|---|
| First post | 2018-02-04 07:39 -0800 |
| Last post | 2018-02-05 17:49 -0800 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.programming
Raw Socket programming Ilias Abrams <iliasabrams@gmail.com> - 2018-02-04 07:39 -0800
Re: Raw Socket programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-04 19:31 +0000
Re: Raw Socket programming Chad <cdalten@gmail.com> - 2018-02-05 17:49 -0800
| From | Ilias Abrams <iliasabrams@gmail.com> |
|---|---|
| Date | 2018-02-04 07:39 -0800 |
| Subject | Raw Socket programming |
| Message-ID | <bd0670e2-5bd8-4a5f-ab61-d79ac57566a9@googlegroups.com> |
Hi there, I want to configure and send a simple packet (TCP or UDP) between two devices in a local network using static IP configuration. But, I am not aware of the logical process of about the layers that I need to programming and configure. Meaning, I need a TCP/IP stack socket and this socket will communicate with the drivers of the specific NIC card that I have? To be honest I dont know exactly the steps and what I need to configure. P.S. I want to use a Bare-metal TCP/IP stack like LW:IP that does not need the existance of a OS. Can anyone explain me / describe to me the logical process in bullets style what I need to programming. Many thanks
[toc] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2018-02-04 19:31 +0000 |
| Message-ID | <87bmh4y2kr.fsf@bsb.me.uk> |
| In reply to | #8347 |
Ilias Abrams <iliasabrams@gmail.com> writes: > I want to configure and send a simple packet (TCP or UDP) between two > devices in a local network using static IP configuration. A simple packet suggests UDP. TCP is a stream protocol. > Can anyone explain me / describe to me the logical process in bullets > style what I need to programming. What system and what language? On Unix-like systems the low-level outline for something like a C program is: For the receiver: Create a socket. Call bind with a zero address to associate a local IP address with it. Call listen to indicate that the socket is read to accept data. Wait for data using something like select. For the sender: Create a socket. Call bind with the destination address. Use send to send (or write) to send a datagram. (Note: It's been a while, so you will have to check this.) -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Chad <cdalten@gmail.com> |
|---|---|
| Date | 2018-02-05 17:49 -0800 |
| Message-ID | <d07dbaf2-4487-4994-9e50-c8d912530bb6@googlegroups.com> |
| In reply to | #8349 |
On Sunday, February 4, 2018 at 11:31:05 AM UTC-8, Ben Bacarisse wrote: > Ilias Abrams <iliasabrams@gmail.com> writes: > > > I want to configure and send a simple packet (TCP or UDP) between two > > devices in a local network using static IP configuration. > > A simple packet suggests UDP. TCP is a stream protocol. > > > Can anyone explain me / describe to me the logical process in bullets > > style what I need to programming. > > What system and what language? > > On Unix-like systems the low-level outline for something like a C > program is: > > For the receiver: > Create a socket. > Call bind with a zero address to associate a local IP address with it. > Call listen to indicate that the socket is read to accept data. > Wait for data using something like select. > > For the sender: > Create a socket. > Call bind with the destination address. > Use send to send (or write) to send a datagram. > > (Note: It's been a while, so you will have to check this.) > > I think you're right.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming
csiph-web