Navigation
Home
gpl
lampd
v1.0
lampd.h








































lampd.h
   
   /*
    * lampd.h
    *
    *  Written by Daan Vreeken
    *   Danovitsch@hotmail.com
    *
    *  Published under the terms of the GNU Public License 2.0
    *  (or any later version)
    *
    */
   
   
   
   #include <sys/types.h>
   #include <sys/socket.h>
   #include <sys/sysctl.h>
   #include <sys/time.h>
   
   #include <netinet/in.h>
   #include <netinet/in_systm.h>
   #include <netinet/ip.h>
   
   #include <signal.h>
   #include <netdb.h>
   
   #include <stdio.h>
   #include <stdlib.h>
   #include <unistd.h>
   
   #include <pthread.h>
   
   
   
   #define Debug( x )		if (WantDebug) { x }
   //#define Debug( x )		x
   
   
   
   #define LampPort		4321
   
   
   enum LampState
   {
   	Off=0, On, Blink
   };
   
   
   #define FlagSet			1
   #define FlagGet			2
   #define FlagDefault		4
   
   
   struct SInPacket
   {
   	unsigned char		Cmd;
   	unsigned char		LampNr;
   
   	enum LampState		NewState;
   };
   
   
   
   struct SOutPacket
   {
   	unsigned char		LampNr;
   	
   	enum LampState		State;
   	int			Timeout;
   };
   
   
   
   
   
   
   
   
   

syntax highlighted by Code2HTML, v. 0.9.1


Email me with questions/comments : Daan <Daan @ pa4dan . nl>