IPSEC_SUBNETOF(3) Library Functions Manual IPSEC_SUBNETOF(3)NAME
ipsec_subnetof, ipsec_hostof, ipsec_broadcastof - given Internet address and subnet mask return subnet number, host part, broadcast address
SYNOPSIS
#include <libreswan.h>
struct in_addr subnetof(struct in_addr addr,
struct in_addr mask);
struct in_addr hostof(struct in_addr addr,
struct in_addr mask);
struct in_addr broadcastof(struct in_addr addr,
struct in_addr mask);
DESCRIPTION
These functions are obsolete; see ipsec_networkof(3) for their replacements.
Subnetof takes an Internet address and a subnet mask and returns the network part of the address (all in network byte order). Hostof simi-
larly returns the host part, and broadcastof returns the broadcast address (all-1s convention) for the network.
These functions are provided to hide the Internet bit-munging inside an API, in hopes of easing the eventual transition to IPv6.
SEE ALSO inet(3), ipsec_atosubnet(3)HISTORY
Written for the FreeS/WAN project by Henry Spencer.
BUGS
Calling functions for this is more costly than doing it yourself.
11 June 2001 IPSEC_SUBNETOF(3)
Check Out this Related Man Page
IPSEC_GOODMASK(3) Library Functions Manual IPSEC_GOODMASK(3)NAME
ipsec_goodmask, ipsec_masktobits, ipsec_bitstomask - check if Internet subnet mask is valid, convert Internet subnet mask to bit count,
convert bit count to Internet subnet mask
SYNOPSIS
#include <libreswan.h>
int goodmask(struct in_addr mask);
int masktobits(struct in_addr mask);
struct in_addr bitstomask(int n);
DESCRIPTION
These functions are obsolete; see ipsec_masktocount(3) for a partial replacement.
Goodmask reports whether the subnet mask is a valid one, i.e. consists of a (possibly empty) sequence of 1s followed by a (possibly empty)
sequence of 0s. Masktobits takes a (valid) subnet mask and returns the number of 1 bits in it. Bitstomask reverses this, returning the
subnet mask corresponding to bit count n.
All masks are in network byte order.
SEE ALSO inet(3), ipsec_atosubnet(3)DIAGNOSTICS
Masktobits returns -1 for an invalid mask. Bitstomask returns an all-zeros mask for a negative or out-of-range n.
HISTORY
Written for the FreeS/WAN project by Henry Spencer.
BUGS
The error-reporting convention of bitstomask is less than ideal; zero is sometimes a legitimate mask.
11 June 2001 IPSEC_GOODMASK(3)
I am a real newbie to linux/unix and need alot of help. I have been trying to find through books and internet , how to change the network properties(ip address,subnet mask, protocols,ect..)But I cant seem to find out how.Also do I need to install samba to network to other windows machines on a peer... (2 Replies)
Hello I'm trying to get my sun box to keep its' ifconfig info after reboot. I can get it to keep the IP but it won't take the subnet mask. I'm using a /30 address.
thanks
Conley (1 Reply)
Hello everybody,
I am a new unix user (Solaris 10). I was wondering if anybody can help me figure out how to connect to the network in my work place. I know my IP address, subnet mask, gateway, primary and secondary DNS addresses but I don't know how to enter these settings into my Solaris.
... (3 Replies)
Hi.
I got this message in our sun station and it stuck
Setting default IPv4 interface for multicast: add net 224.0/4: gateway pecsun22
but i can still telenet the station...
who could i fix this..
appreciate your help (7 Replies)
I understand how to change the ip address permanently however, I need to also make a permanent change to the subnet mask. How would I accomplish this. (5 Replies)
Hi,
I have a task to edit the subnet mask in almost 100+ solaris servers.Few of the servers are configured with IPMP.There will be no change of IP address or default gateway.If its a single IP we can bring NIC down,change the subnet mask in /etc/netmasks,then bring the NIC back to normal.But... (3 Replies)
Hello,
I am running a post script in autoyast where I am trying to set the broadcast and network address.
I have the ip address and netmask already (reading from a file)..
I saw the post from fpmurphy but it is using ksh which isn't an option in autoyast.
Thanks in advance! (3 Replies)
Hello, Newbie question on scripting - I'm looking to create a simple script that will work on RHEL5 that will adjust the network settings: ip address, default gateway, and subnet mask. If anything else needs to be done (service network stop / start) or should be done to make settings active - I... (4 Replies)
Hello, I need to write a program which sets server's ip address, router, network mask. Program also should set if it is an internal or external ip. Maybe someone can help me ? Any information from u is very useful :b:
I stopped at .. :(
#!/bin/sh
A=`hostname -i`
echo "server ip address is $A"... (4 Replies)
Is there a command that display all network info. I'm looking for ip address, subnet mask, gateway, and dns. If there isn't a single command could someone please write me a shellscript that can do this? (8 Replies)
Is there a command that can lookup ip address, subnet mask, gateway, and dns all at the same. I know ifconfig can lookup ip address and subnet mask. I know route -n can lookup gateway. Not sure about a dns command. So I hope there is a way to lookup ip address, subnet mask, gateway, and dns all at... (2 Replies)