Leanpub Header

Skip to main content

Programmable Networks with C++

Network Automation for SDN, Intrusion Detection, Cloud, Kubernetes and AI Infrastructure with C++23

Programmable Networks with C++
This book is 100% completeLast updated on 2026-08-31

In this book, we plan before we act, we preview before we commit, we gate on evidence rather than on hope, and we write the recovery before we take the risk. By the time you get to the last chapter, you'll be familiar with the switches over NETCONF, server provisioning, building overlays, traffic inspection, cloud network provisioning, Kubernetes resource application, RDMA fabric validation, inference traffic routing, and reporting your findings through an interface that an assistant can query.

Minimum price

$29.99

$29.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

These days, networks aren't just racks of switches anymore, they're also AI clusters. A single training job depends on a lossless fabric, a Kubernetes control plane, a cloud VPC, an inference gateway, and a telemetry pipeline that has to notice trouble before anybody files a ticket. Even with something as strong as Python glue, it's not going to hold up at that size. But C++23 doesn't. When you get to the end of this book, you'll have a fully-fledged automation tool at your disposal.

The book kicks off with std::expected, std::span, ranges, and coroutines applied to real device work, then builds a CMake and vcpkg project with sanitizers, tests, and a containerlab fabric. Then you can drive NETCONF, YANG, and gNMI, provision servers over SSH and Ansible, program OVSDB and VXLAN overlays, automate Suricata and Vectorscan detection, and reach AWS and Azure through one interface. The last couple of chapters show you how to use Kubernetes resources on the server side, attach pods to RDMA devices through Multus and SR-IOV, and validate PFC and ECN across a RoCEv2 fabric. Plus, there'll be token streaming for vLLM replicas, your tooling will be exposed as an MCP server, and the loop will be closed with OpenTelemetry and guarded remediation. Everything's on one Linux laptop.

Key Learnings
  • Plan every change so it can be undone, and see it before it runs.
  • Hand back errors as values with std::expected, so nothing fails quietly overnight.
  • Read packets without copying them, using std::span, and let sanitizers catch your mistakes.
  • Check five hundred devices at once with coroutines, and never write a callback.
  • Check a change against the device model before you send it anywhere.
  • Roll out to a few devices first, and widen only when they behave.
  • Let your C++ drive Ansible, Suricata, and ovs-ofctl instead of rebuilding them.
  • Apply Kubernetes changes safely, then check from inside the pod that they worked.
  • Send AI requests to the least busy replica, and tune the connection for tokens.
  • Spot trouble with limits, moving averages, and a model that advises but never acts.

Table of Content
  1. C++23 for Network Automation
  2. Setting up Automation Environment
  3. Writing, Testing, and Validating Automation Scripts
  4. Device Configuration with NETCONF, YANG and gNMI
  5. Server Provisioning and Configuration Management
  6. Software-Defined Networking
  7. Practical IDS/IPS Automation
  8. Cloud Network Automation
  9. Kubernetes as AI Cluster Control Plane
  10. RDMA and GPU Fabric Automation

Target Readers

If you're a network engineer, systems programmer, or part of an infrastructure team, then this book is for you. You don't need to have any prior experience with SDN, Kubernetes, or machine learning for this book. Just some basics of coding around C++ and fundamentals of networking is sufficient.

 

Author

About the Author

GitforGits | Asian Publishing House

We are the engineer’s publisher, the coder’s mentor, and the content alchemist—meticulously turning dense tech into practical gold. With a growing library of 100+ titles, we don’t just develop technical books, rather we build roadmaps for professionals across Python, MySQL, DevOps, Rust, AI, Kotlin, Arduino, Golang and everything around the massive IT ecosystem. Every chapter, every script, every project is a tool in the hands of developers who want to get things done.

Where others summarize, we construct step-by-step learning blueprints, cutting through clutter, banning the fluff, and ensuring every paragraph delivers hands-on value. Our audience isn’t learning from scratch—they’re leveling up with purpose, and we stand by them with code-first content, consistent project workflows, and a zero-redundancy approach.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub