Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ipsec_goodmask(3) [debian 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 <freeswan.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)

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 <freeswan.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)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

networking solaris8 with windows2000

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)
Discussion started by: scotte
2 Replies

2. UNIX for Dummies Questions & Answers

internet access

I've configured my TCP/IP to have the right protocols to access the internet such as TPC/IP, subnet mask, gateway and dns server but still Im not able to ping anything to the internet. Anybody who has some few good words for me? I need help. Thanks. (2 Replies)
Discussion started by: nseal101
2 Replies

3. UNIX for Advanced & Expert Users

Sun 5.8 IFCONFIG INFo

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)
Discussion started by: chameleon854
1 Replies

4. IP Networking

network setup???

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)
Discussion started by: arash05
3 Replies

5. Solaris

making new default gateway take affect

How do you make the changes take affect when you change the subnet masks or default router without rebooting? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

6. IP Networking

changing the subnet mask permanently

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)
Discussion started by: johnparksjr
5 Replies

7. IP Networking

How do I figure out the subnet?

Hi, How do I get subnet from this: 10.252.0.138/25 Tnx (2 Replies)
Discussion started by: mehrdad68
2 Replies

8. Solaris

Need help in changing the subnet mask

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)
Discussion started by: rajip23
3 Replies

9. Solaris

how to change the subnet mask of interface

Hi all, could you please tell me how to Change the subnet mask of interface aded:1 from ffffffc0 to ffffff80 regards Krishna (7 Replies)
Discussion started by: murthy76
7 Replies

10. UNIX for Advanced & Expert Users

Show all network info

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)
Discussion started by: cokedude
8 Replies

11. IP Networking

lookup ip address, subnet mask, gateway, and dns at same time

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)
Discussion started by: cokedude
2 Replies

12. IP Networking

Changing the subnet mask on solaris 10

(2 Replies)
Discussion started by: cjashu
2 Replies

13. Shell Programming and Scripting

Get the ipaddress and align based on the input file

Hi All, I have a file contains below contents, "interfacename/subnet: public (or) interfacename/subnet:cluster_interconnect" "en2"/10.185.81.0:cluster_interconnect,"en5"/10.185.81.0:cluster_interconnect,"en6"/169.181.146.0:public... (6 Replies)
Discussion started by: kamauv234
6 Replies

14. Shell Programming and Scripting

Get all ip address from subnet mask

I have this subnet file shown below. How can I calculate all ip addresses from that list 103.22.200.0/22 141.101.64.0/18 10.0.0.0/22I need to be able to read the subnet file and print all IPs in those subnet to an out put file (3 Replies)
Discussion started by: e_mikey_2000
3 Replies

15. AIX

Nim client with different subnet to Master

Iam attempting to add a client to NIM however the new client has a different subnet than master 10... & 193... , I've established from redbooks that it should be possible but can't find anything that states how? Does anyone use nim in this way? (5 Replies)
Discussion started by: gefa
5 Replies