/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Licensed under the Academic Free License version 2.1
*/
#include <glib.h>
#include <libhal.h>
#include <logger.h>
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include "network-discovery.h"
#include "printer.h"
static void
{
/* most printers listen on the appsocket port (9100) */
}
/*
* This would be a good place to detect other types of devices or other
* device capabilities. scanners, removable media, storage, ...
*/
}
static int
{
char *name;
/* have we already seen this network device */
return (0);
}
char *network)
{
HAL_DEBUG(("scan_for_devices_using_snmp(0x%8.8x, %s, %s, %s)",
init_snmp("snmp-scan");
init_mib();
/* initialize the SNMP session */
return (FALSE);
/* initialize the request PDU */
/* add the requested data (everyone should have a sysDescr.0) */
snmp_perror("sysDescr.0");
/* detect any new devices */
while (1) {
if (fds < 0) {
perror("select failed");
break;
} if (fds == 0) {
break;
} else {
}
}
snmp_close(ss);
/* add the newly detected devices */
}
return (TRUE);
}