xref: /illumos-gate/usr/src/cmd/hal/addons/network-devices/network-discovery.h (revision 2983dda76a6d296fdb560c88114fe41caad1b84f)
1 /*
2  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  *
5  * Licensed under the Academic Free License version 2.1
6  */
7 
8 #pragma ident	"%Z%%M%	%I%	%E% SMI"
9 
10 #ifndef NETWORK_DEVICE_COMMON_H
11 #define	NETWORK_DEVICE_COMMON_H
12 
13 #include <libhal.h>
14 
15 extern void network_device_name_to_udi(char *udi, size_t size, ...);
16 extern int add_network_printer(LibHalContext *ctx, char *parent, char *hostaddr,
17 			char *device, char *community);
18 
19 extern gboolean scan_for_devices_using_snmp(LibHalContext *ctx, char *parent,
20 		char *community, char *network);
21 extern void scan_for_stale_devices(LibHalContext *ctx, time_t timestamp);
22 extern gboolean device_seen(char *name);
23 
24 extern int is_listening(char *hostname, int port);
25 
26 extern GList *broadcast_addresses();
27 
28 #endif /* NETWORK_DEVICE_COMMON_H */
29