---
name: cloud-logs-dataprime-ref-ip-func
title: DataPrime IP functions
description: This guide provides a glossary of IBM&reg; Cloud Logs DataPrime IP functions.
last-updated: 2025-10-17
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/cloud-logs?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# DataPrime IP functions
{: #dataprime-ref-ip-func}

This guide provides a glossary of IBM&reg; Cloud Logs DataPrime IP functions.
{: shortdesc}


## `ipInSubnet`
{: #ipinsubnet}

Returns true if IP is in the subnet of `ipPrefix`.

```text
ipInSubnet(ip: string, ipPrefix: string): bool
```
{: codeblock}



## `ipPrefix`
{: #ipprefix}

Returns the IP prefix of a given IP address with `subnetSize` bits (for example, 192.128.0.0/9).

```text
ipPrefix(ip: string, subnetSize: number): string
```
{: codeblock}