# Demonstration of adding a new extern to BMv2 / behavioral-model

**URL:** <https://forum.p4.org/t/demonstration-of-adding-a-new-extern-to-bmv2-behavioral-model/542>\
**Category:** P4 Dev\
**Created:** [November 20, 2022, 4:56pm UTC](https://forum.p4.org/t/demonstration-of-adding-a-new-extern-to-bmv2-behavioral-model/542 "2022-11-20T16:56:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyfingerhut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/andyfingerhut/32/17_2.png) [@andyfingerhut](https://forum.p4.org/u/andyfingerhut)\
**Post date:** [November 20, 2022, 4:56pm UTC](https://forum.p4.org/t/demonstration-of-adding-a-new-extern-to-bmv2-behavioral-model/542/1 "2022-11-20T16:56:23Z")

</div>

This example does NOT have a control plane API, only a data plane API, but some may still find it useful if they ever want to extend BMv2 with a new extern, as an example to learn from. I am putting a link to it here since otherwise it could be difficult to find.

> <https://github.com/p4lang/behavioral-model/pull/1140>
>
> I spent some time learning how to do this myself as a result of \[this discussion…\](https://github.com/p4lang/p4c/pull/3502). I thought it might be useful to add an example here to help others. This example roughly follows @jafingerhut's \[suggestion from a previous discussion\](https://github.com/p4lang/behavioral-model/issues/697#issuecomment-565759070).
