---
name: "cfg80211_testmode_alloc_event_skb"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/cfg80211_testmode_alloc_event_skb"
---

# cfg80211\_testmode\_alloc\_event\_skb(9)

allocate testmode event

## NAME

cfg80211\_testmode\_alloc\_event\_skb - allocate testmode event

## SYNOPSIS

**struct sk\_buff \* cfg80211\_testmode\_alloc\_event\_skb(struct wiphy \*** *wiphy***, int** *approxlen***, gfp\_t** *gfp***);**

## ARGUMENTS

*wiphy*

the wiphy

*approxlen*

an upper bound of the length of the data that will be put into the skb

*gfp*

allocation flags

## DESCRIPTION

This function allocates and pre-fills an skb for an event on the testmode multicast group.

The returned skb is set up in the same way as with **cfg80211\_testmode\_alloc\_reply\_skb** but prepared for an event. As there, you should simply add data to it that will then end up in the **NL80211\_ATTR\_TESTDATA** attribute. Again, you must not modify the skb in any other way.

When done filling the skb, call **cfg80211\_testmode\_event** with the skb to send the event.

## RETURN

An allocated and pre-filled skb. **NULL** if any errors happen.

## AUTHOR

**Johannes Berg** \<johannes@sipsolutions.net\>

Author.

## COPYRIGHT
