Sponsored Content
Top Forums UNIX for Beginners Questions & Answers ARP and Bonjour to build list of user devices Post 302993639 by Zooma on Sunday 12th of March 2017 04:55:45 PM
Old 03-12-2017
Thanks drysdalk. Had some errors when converting the obtained broadcast address. Just replaced step 1 and 2 with:
Code:
ping -i eth0 255.255.255.255 -b

Problem solved. Smilie
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

passthrough devices vs. named devices

I am having trouble understanding the difference between a passthrough device and a named device and when you would use one or the other to access equipment. As an example, we have a tape library and giving the command "camcontrol devlist" gives the following output: akx# camcontrol... (1 Reply)
Discussion started by: thumper
1 Replies

2. HP-UX

list of devices

Hi, I need to rediracte all the names of the devices (only disks) to a file. Thanks:confused: (3 Replies)
Discussion started by: yoavbe
3 Replies

3. Shell Programming and Scripting

Run SQL command for a list of devices

Hi Please help me to resolve. Question: I can run this command to change the mode of a device with id=500 as below dbc "select device mode=3 where id=500;" How can i run the same query with a file contaning n number of ids ? file1.txt 12 234 34 500 34 45 Thanks in... (3 Replies)
Discussion started by: sureshcisco
3 Replies

4. Shell Programming and Scripting

Perl - run sub routine for list of devices

Hi, Can anyone please correct the script such that it run on all the devices in the devicelist.txt file. The problem is when the script runs it only reads the first device in the list, configures the device and exists. Script: The devicelist.txt: device.crs... (1 Reply)
Discussion started by: sureshcisco
1 Replies

5. UNIX for Dummies Questions & Answers

Adding SDK Build on Kernel Source Build

Hi, So I downloaded this kernel source and was able to build it successfully. But I want to add this SDK source code inside, can anyone help me how to do this? Note that the SDK source can be built by itself. I added the SDK in the main Makefile: init-y := init/ #added SDK... (0 Replies)
Discussion started by: h0ujun
0 Replies

6. UNIX for Advanced & Expert Users

How to handle build user access/permissions?

All, I am looking for some guidance on how to handle permissions/access for an application build/deployment. We need to allow for software deployments via Visual Studio Team Services and a build server running on Windows, deploying to RHEL 7 servers. We would like to use a service account,... (3 Replies)
Discussion started by: hburnswell
3 Replies
Net::Bonjour(3pm)					User Contributed Perl Documentation					 Net::Bonjour(3pm)

NAME
Net::Bonjour - Module for DNS service discovery (Apple's Bonjour) SYNOPSIS
use Net::Bonjour; my $res = Net::Bonjour->new(<service>[, <protocol>]); $res->discover; foreach my $entry ( $res->entries ) { printf "%s %s:%s ", $entry->name, $entry->address, $entry->port; } Or the cyclical way: use Net::Bonjour; my $res = Net::Bonjour->new(<service>[, <protocol>]); $res->discover; while ( 1 ) { foreach my $entry ( $res->entries ) { print $entry->name, " "; } $res->discover; } DESCRIPTION
Net::Bonjour is a set of modules that allow one to discover local services via multicast DNS (mDNS) or enterprise services via traditional DNS. This method of service discovery has been branded as Bonjour by Apple Computer. Base Object The base object would be of the Net::Bonjour class. This object contains the resolver for DNS service discovery. Entry Object The base object (Net::Bonjour) will return entry objects of the class Net::Bonjour::Entry. METHODS
new([<service>, <protocol>, <domain>]) Creates a new Net::Bonjour discovery object. First argument specifies the service to discover, e.g. http, ftp, afpovertcp, and ssh. The second argument specifies the protocol, i.e. tcp or udp. The default protocol is TCP. The third argument specifies the discovery domain, the default is 'local'. If no arguments are specified, the resulting Net::Bonjour object will be empty and will not perform an automatic discovery upon creation. all_services([<domain>]) Returns an array of new Net::Renedezvous objects for each service type advertised in the domain. The argument specifies the discovery domain, the default is 'local'. Please note that the resulting Net::Bonjour objects will not have performed a discovery during the creation. Therefore, the discovery process will need to be run prior to retriving a list of entries for that Net::Bonjour object. domain([<domain>]) Get/sets current discovery domain. By default, the discovery domain is 'local'. Discovery for the 'local' domain is done via MDNS while all other domains will be done via traditional DNS. discover Repeats the discovery process and reloads the entry list from this discovery. entries Returns an array of Net::Renedezvous::Entry objects for the last discovery. protocol([<protocol>]) Get/sets current protocol of the service type, i.e. TCP or UDP. Please note that this is not the protocol for DNS connection. service([<service type>]) Get/sets current service type. shift_entry Shifts off the first entry of the last discovery. The returned object will be a Net::Bonjour::Entry object. EXAMPLES
Print out a list of local websites print "<HTML><TITLE>Local Websites</TITLE>"; use Net::Bonjour; my $res = Net::Bonjour->new('http'); $res->discover; foreach my $entry ( $res->entries) { printf "<A HREF='http://%s%s'>%s</A><BR>", $entry->address, $entry->attribute('path'), $entry->name; } print "</HTML>"; Find a service and connect to it use Socket; use Net::Bonjour; my $res = Net::Bonjour->new('custom'); $res->discover; my $entry = $res->shift_entry; socket SOCK, PF_INET, SOCK_STREAM, scalar(getprotobyname('tcp')); connect SOCK, $entry->sockaddr; print SOCK "Send a message to the service"; while ($line = <SOCK>) { print $line; } close SOCK; Find all service types and print. use Net::Bonjour; foreach my $res ( Net::Bonjour->all_services ) { printf "%s (%s) ", $res->service, $res->protocol; } Find and print all service types and entries. use Net::Bonjour; foreach my $res ( Net::Bonjour->all_services ) { printf "-- %s (%s) --- ", $res->service, $res->protocol; $res->discover; foreach my $entry ( $res->entries) { printf " %s (%s:%s) ", $entry->name, $entry->address, $entry->port; } } SEE ALSO
Net::Bonjour::Entry COPYRIGHT
This library is free software and can be distributed or modified under the same terms as Perl itself. Bonjour (in this context) is a trademark of Apple Computer, Inc. AUTHORS
The Net::Bonjour module was created by George Chlipala <george@walnutcs.com> perl v5.10.0 2009-02-28 Net::Bonjour(3pm)
All times are GMT -4. The time now is 06:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy