UDP Packet Writing
| From: | Adam Voigt | Date: | Thu, 08 May 2003 14:02:21 +0000 |
| Subject: | UDP Packet Writing | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146844@lists.php.net to get a copy of this message | ||
I'm trying to interface with a hardware device, and
according to the networking API for it, in order
to communicate with it, you need to send UDP packets
crafted in a certain format. Example:
0 Command Routine
1 reserved
2..5 IP to Sync
6..7 Port
8..17 reserved
And well I'm not quite sure how to do this.
Am I jus supposed to use the socket functions to
open a connection, then write it all with one
fwrite, implaning a NULL where it says reserved,
or what?
Any ideas?
--
Adam Voigt (adam@cryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group