Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
UDP source port in C
Name: kallor Date: April 17, 2008 at 02:18:49 Pacific OS: linux 2.6.24 CPU/Ram: - Product: -
Comment:
Hi. Im sending data over a SOCK_DGRAM socket, is it possible to define what source port my program will use? I guess one alternative is to craft the UDP header by myself, what type of socket would I use then? Do I have to craft the IP header aswell and use SOCK_RAW?
Name: kallor Date: April 17, 2008 at 05:41:53 Pacific
Reply:
Nevermind. from newsgroups:
> Yes - just set the sin_port field of the struct sockaddr *address > argument you give to bind(). (The default value of 0 for sin_port just > means "pick any available port".)
Summary: how to read serial port in C language. printf("%d", inport(0)); outportb(0, 65); delay(1000); printf("%d", inport(0)); supposing initial value at serial port is 64. Both printf's display 64 only. When...
Summary: I'm currently working on a personal project. I want to be able to send an MP3 file, which has been converted to binary form, via the parallel port to a microcontroller and then eventually transmit the...
Summary: Hello, do you know where I can find the source code in C that calculates a 16-bit CCITT SDLC CRC? It uses the polynomial X**16 + X**12+X**5+1. Thanks. ...