Path: csiph.com!aioe.org!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.programming Subject: Re: Raw Socket programming Date: Sun, 04 Feb 2018 19:31:00 +0000 Organization: A noiseless patient Spider Lines: 30 Message-ID: <87bmh4y2kr.fsf@bsb.me.uk> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="53e6bd2fb8f588c21c3e7d0a5b702dd1"; logging-data="6885"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2mxbsgLh75zF68MX6NgkixbRVr1J3fhc=" Cancel-Lock: sha1:B+EgSIqFivICHRiTnnalFE4t8wc= sha1:3O+AmVqsjcsoE0bldNhltOrVUZA= X-BSB-Auth: 1.694fe6a816b42943946c.20180204193100GMT.87bmh4y2kr.fsf@bsb.me.uk Xref: csiph.com comp.programming:8349 Ilias Abrams 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.