33 lines
No EOL
695 B
C
33 lines
No EOL
695 B
C
// header files
|
|
#include "timeserver.h"
|
|
|
|
// constants
|
|
// timeserver port is 8888
|
|
#define TIMEPORT "8888"
|
|
|
|
// prototypes
|
|
|
|
// main function
|
|
int main(int argc, char **argv)
|
|
{
|
|
// initialize program (variables and structs)
|
|
// define a UDP socket
|
|
// bind the UDP socket to port 8888 / TIMEPORT
|
|
// while loop to see if the "time\r\n" has been received (recv call?)
|
|
// if "time\r\n" is received, then send() back the linux epoch.
|
|
// profit???
|
|
return 0;
|
|
}
|
|
|
|
// function definitions
|
|
|
|
/*
|
|
Name: ???
|
|
Process: ???
|
|
Function Input/Parameters: ???
|
|
Function Output/Parameters: ???
|
|
Function Output/Returned: ???
|
|
Device Input/Device: ???
|
|
Device Output/Device: ???
|
|
Dependencies: ???
|
|
*/ |