10-18-2010
Isn't the ip address the network address?
Last I checked, the broadcast address = ~netmask | ip (top address), although sometime I think netmask & ip would also work (bottom address), yup, it does.
Can you call executables, or run somethng earlier to make it easy to pick up, like from the environment?
10 More Discussions You Might Find Interesting
1. IP Networking
What is the significance of the broadcast address? (1 Reply)
Discussion started by: 98_1LE
1 Replies
2. Shell Programming and Scripting
Dear all,
This is the Bionic Fysh again. I have two quick questions:
1- when writing shell scripts, how does one allow the tilda ~ into the script ?
e.g
ls ~;
ls ~me;
user=you;
ls ~$user (N.B I think that for this one you need: ls `~$user`)
2- In FreeBSD 4.0, I would like for a... (6 Replies)
Discussion started by: bionicfysh
6 Replies
3. UNIX for Dummies Questions & Answers
say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on?
And could you explain how to get the answer?
thanx in advance! (7 Replies)
Discussion started by: pnxi
7 Replies
4. Solaris
I have a bge1 card and a bge0 card, i want the broadcast addresses to match, ifconfig shows this
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
... (1 Reply)
Discussion started by: csaunders
1 Replies
5. Shell Programming and Scripting
hi all...
I am executing a comman in a shell script but the command needs a user input of character 'y' as input so it stops in between...may i know is there is any way of giving that character as input in the shell script itself???...thanks in advance.... (6 Replies)
Discussion started by: santy
6 Replies
6. Shell Programming and Scripting
Hi,
I want to send input to promt from shell script, this thing is possible.
I give the one command
`/usr/share/ssl/misc/CA -newreq`
it needs some user input like password etc., but i need this input also from shell script but it does not works.
`/usr/share/ssl/misc/CA -newreq` <<EOF... (2 Replies)
Discussion started by: Vaibhav Agarwal
2 Replies
7. Shell Programming and Scripting
Hi
Suppose
You have two computers. One named kenny which has an IP address of 192.168.0.7. kenny lives
on a subnet with a subnet mask of 255.255.255.240. The second computer is called zathras, which
has an IP address of 192.168.0.17, zathras lives on a network with the same subnet mask.
i)... (4 Replies)
Discussion started by: scofiled83
4 Replies
8. Solaris
hi,
I am trying to configure one of my interfaces, but after reboot - i lose the changes to the netmask & broadcast address.
I have added an entry in /etc/netmasks, but it doesnt pick up the new settings. any ideas - much appreciated.
before reboot:
eri0:... (3 Replies)
Discussion started by: badoshi
3 Replies
9. Programming
My problem definition is ,I have to send a message from one node in a network and it has to be broadcasted to all other nodes in the network.The program what I have given below will be running in all the nodes in the network.The same program should be capable of sending(broadcasting) and receiving.... (1 Reply)
Discussion started by: vigneshinbox
1 Replies
10. Shell Programming and Scripting
Hi folks
I need to write UNIX script (with ldapsearch) to query Active Directory. Input is NT login name and output is Email address.
Attached a screenshot of Sysinternals "AD Explorer". I need to do the same in CLI.
http://i.imgur.com/4s6FB.png
I am absolute LDAP/ldapsearch noob. (0 Replies)
Discussion started by: slashdotweenie
0 Replies
LEARN ABOUT OPENSOLARIS
net_getlifaddr
net_getlifaddr(9F) Kernel Functions for Drivers net_getlifaddr(9F)
NAME
net_getlifaddr - determine a network address for a given interface
SYNOPSIS
#include <sys/neti.h>
int net_getlifaddr(const net_data_t net, const phy_if_t ifp,
const net_if_t lif, int const type,
struct sockaddr* storage);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
net value returned from a successful call to net_protocol_lookup(9F).
ifp value returned from a successful call to net_phylookup(9F) or net_phygetnext(9F), indicating which network interface the infor-
mation should be returned from.
lif indicates the logical interface from which to fetch the address.
type indicates what type of address should be returned. See below for more details on this field.
storage pointer to an area of memory to store the address data.
DESCRIPTION
The net_getlifaddr() function retrieves the address information for each logical interface. Each call to net_getlifaddr() requires that the
caller pass a pointer to an array of address information types to retrieve, and an accompanying pointer to an array of pointers to struct
sockaddr structures to which to copy the address information. See net_lifgetnext(9F) for an example on how to use this function.
Each member of the address type array should be one of the values listed here.
NA_ADDRESS Return the network address associated with the logical interface (lif) that belongs to the network interface (ifp).
NA_PEER Return the address assigned to the remote host for point to point network interfaces for the given network/logical inter-
face.
NA_BROADCAST Return the broadcast address assigned to the given network/logical interface for network interfaces that support broadcast
packets.
NA_NETMASK Return the netmask associated with the given network/logical interface for network interfaces that support broadcast pack-
ets.
RETURN VALUES
The net_getlifaddr() function returns:
-1 The network protocol does not support this function.
0 Successful completion.
1 Unsuccessful.
CONTEXT
The net_getifaddr() function may be called from user, kernel, or interrupt context.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
SEE ALSO
net_lifgetnext(9F), net_phylookup(9F), net_phygetnext(9F)net_protocol_lookup(9F)
SunOS 5.11 13 Oct 2008 net_getlifaddr(9F)