Skip to content

Update Programmable Flow Protection developer docs#29500

Open
anita-tenjarla wants to merge 1 commit intocloudflare:productionfrom
anita-tenjarla:production
Open

Update Programmable Flow Protection developer docs#29500
anita-tenjarla wants to merge 1 commit intocloudflare:productionfrom
anita-tenjarla:production

Conversation

@anita-tenjarla
Copy link
Copy Markdown

Summary

For the Programmable Flow Protection feature:

  • Update all references to rules and programs to reference new dashboard UI instead of API
  • Add new helper functions to helper function table & appendix
  • Update sample programs in examples
  • Various bug fixes

Documentation checklist

* Update all references to rules and programs to reference UI instead of API
* Add new helper functions
* Update sample programs in examples
| Operation | Verb + Endpoint |
| --- | --- |
| Debug Packet CAPture (PCAP) | `POST /accounts/{account_id}/magic/programmable_flow_protection/configs/programs/{program_id}/pcap?ip_offset={ip_offset_value}` | No newline at end of file
| Debug Packet CAPture (PCAP) | `POST /accounts/{account_id}/magic/programmable_flow_protection/configs/programs/{program_id}/pcap` | No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we no longer taking IP offset in the request params?


<Steps>
1. Write a C program and [upload it via the API](#upload-a-program).
1. Upload your eBPF program.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still probably say "written in C" somewhere here

Comment on lines +139 to +141
Note the iphdr, ipv6hdr, and udphdr match the exact structures defined in Linux [ip.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/ip.h), [ipv6.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/ipv6.h) and [udp.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/udp.h) respectively.

6. Write your custom logic.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally, we currently re-implement some of these structures -- while they should match exactly it might be good to publish that snippet of the headers in the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants