Nut/OS  5.0.5
API Reference
discover.h File Reference

Responds to UDP discovery broadcasts. More...

#include <sys/types.h>
#include <cfg/discover.h>
#include <stdint.h>
Include dependency graph for discover.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _DISCOVERY_TELE

Defines

#define DISCOVERY_VERSION   0x10
#define DIST_REQUEST   0
#define DIST_ANNOUNCE   1
#define DIST_APPLY   2
#define DISF_INITAL_ANN   0x0001

Typedefs

typedef struct _DISCOVERY_TELE DISCOVERY_TELE
typedef int(* NutDiscoveryCallback )(uint32_t, uint16_t, DISCOVERY_TELE *, int)

Functions

int NutRegisterDiscovery (uint32_t ipmask, uint16_t port, unsigned int flags)
 Register discovery telegram responder.
NutDiscoveryCallback NutRegisterDiscoveryCallback (NutDiscoveryCallback func)
 Register a custom discovery callback handler.
int NutDiscoveryAnnTele (DISCOVERY_TELE *dist)
 Create an announcement datagram.
int NutDiscoveryAppConf (DISCOVERY_TELE *dist)
 Apply new configuration.

Detailed Description

Responds to UDP discovery broadcasts.

 *
 * $Log$
 * Revision 1.4  2009/01/17 11:26:51  haraldkipp
 * Getting rid of two remaining BSD types in favor of stdint.
 * Replaced 'u_int' by 'unsinged int' and 'uptr_t' by 'uintptr_t'.
 *
 * Revision 1.3  2009/01/16 17:03:50  haraldkipp
 * Configurable discovery protocol version and port plus
 * configurable service thread stack size. The new version 1.1
 * allows host names up to 98 characters. Added some code
 * to make sure, that nothing is overwritten with version 1.0
 * protocol and too long host names. Protocol version 1.0
 * is still the default.
 *
 * Revision 1.2  2008/08/11 07:00:23  haraldkipp
 * BSD types replaced by stdint types (feature request #1282721).
 *
 * Revision 1.1  2006/09/07 09:06:17  haraldkipp
 * Discovery service added.
 *
 *
 * 

Define Documentation

#define DISCOVERY_VERSION   0x10

Referenced by NutDiscoveryAnnTele().

#define DIST_REQUEST   0
#define DIST_ANNOUNCE   1

Referenced by NutDiscoveryAnnTele().

#define DIST_APPLY   2
#define DISF_INITAL_ANN   0x0001
Examples:
ftpd/ftpserv.c, and httpd/httpserv.c.

Referenced by DiscoveryResponder(), and main().


Typedef Documentation