---
name: "contigmask"
section: "3abz"
platform: "linux"
package: "libabz0-dev"
version: "0.5.1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/contigmask"
---

# contigmask(3abz)

convert network masks to CIDR notation.

## NAME

contigmask - convert network masks to CIDR notation.

## LIBRARIES

Abz Library (-labz), Debug Library (-ldebug)

## SYNOPSIS

```
#include <abz/contigmask.h>

uint8_t contigmask(uint32_t mask);
```

## DESCRIPTION

The **contigmask()** function converts the specified mask (which should be in network byte order) to CIDR notation, if possible.

## RETURN VALUE

The **contigmask()** function returns a CIDR mask (0-31) if successful or 255 if the mask could not be converted to CIDR notation.

## NOTES

None of the libabz routines are thread-safe. I'm not planning to change this either! For more information, please see http://threading.2038bug.com/

## AUTHOR

Written by Abraham vd Merwe \<abz@blio.com\>
