/*
    NetUDP.h, Copyright  (c) by Boris Lutz,
    Swiss Federal Institute of Technology,
    Computer Engineering and Networks Laboratory.
 
    TOPSY -- A Teachable Operating System.
             Implementation of a tiny and simple
             micro kernel for teaching purposes.
 
    For further information, please visit http://www.tik.ee.ethz.ch/~topsy
 
    This software is provided under the terms of the GNU General Public
    Licence. A full copy of the GNU GPL is provided in the file COPYING
    found in the development root of Topsy.
*/
/*
 
    File:                  $Source: /home/ruf/cvs_Topsy/cvs/Topsy/Net/Modules/UDP/NetUDPModule.h,v $
    Author(s):
    Affiliation:           ETH Zuerich, TIK
    Version:               $Revision: 2922 $
    Creation Date:
    Last Date of Change:   $Date: 2007-03-19 17:48:52 +0100 (Mon, 19 Mär 2007) $      by: $Author: baderma $
 
 
    $Log: NetUDPModule.h,v $
    Revision 1.6  2001/02/15 17:16:27  blutz
    BootP works now! Just GetAddr @ socket is not implemented (dummy) and
    UDPPCBDown / Up are to be added to the chain.
 
    Revision 1.5  2001/01/29 15:22:12  blutz
    changed conf function of modules to make the return an error and
    how many configs succeeded or have been igniored
    Adding a facility to cnfigure not only modules but whole bunch of
    them (TYPESET and GET)
 
    Revision 1.4  2001/01/26 18:03:47  cjeker
    todays work, but it still produces some wierd errors
 
    Revision 1.3  2001/01/25 20:25:30  blutz
    well I did a lot of work on Net/Modules and changed some NetAttr defines
 
    Revision 1.2  2001/01/25 18:24:52  blutz
    moved some files and working on UDP Down
 
    Revision 1.1  2001/01/25 16:59:43  blutz
    Moved some files
 
    Revision 1.1  2001/01/25 09:18:57  blutz
    Created NetUDP Modules and started working on them...
 
 
*/
#ifndef _NET_UDP_H_
#define _NET_UDP_H


#include "NetHAL.h"


#define NETUDP_MAXPORTNR    1000
#define NETUDP_FIRST_USER_PORT  500

typedef struct NetUDPHdr_t
{
  u16 sport;
  u16 dport;
  u16 len;
  u16 checksum;
}
NetUDPHdr;


// function prototypes for UDPModuleUp
void netUDPModuleUpInit (NetModule this);
int netUDPModuleUpConfig (NetModule this, Message *msg);
void netUDPModuleUpMain (LWPool lw, ThreadArg arg);
// function prototypes for UDPModuleDown
void netUDPModuleDownInit (NetModule this);
int netUDPModuleDownConfig (NetModule this, Message *msg);
void netUDPModuleDownMain (LWPool lw, ThreadArg arg);
// function prototypes for UDPPCBUp
void netUDPPCBUpInit (NetModule this);
int netUDPPCBUpConfig (NetModule this, Message *msg);
void netUDPPCBUpMain (LWPool lw, ThreadArg arg);
// function prototypes for UDPPCBDown
void netUDPPCBDownInit (NetModule this);
int netUDPPCBDownConfig (NetModule this, Message *msg);
void netUDPPCBDownMain (LWPool lw, ThreadArg arg);


#endif

