PacketC

1 program Added 2026-03-12T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Packet C
Provenance: commit aee72ecbbb · authored 2026-03-12T03:28:46+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

PF (0.23)Pascal-SC (0.19)RobotC (0.19)Pact (0.19)Plan 9 C (0.18)

LLM-contributed programs

Simple IPv4 Packet Filter

Provenance: commit aee72ecbbb · authored 2026-03-12T03:28:46+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.pc · license: CC BY-SA 4.0 · added: 2026-03-12T10:00:00Z
/*
 * PacketC: Simple IPv4 packet filter
 * Forwards IPv4 packets to broadcast, drops all others
 */

#include <cloudshield.ph>
#include <cloudshield_globals.ph>

packet main (pkt_t pkt, svc_t svc, bool cldshld) {
    match (pkt.eth.type) {
        case 0x0800:  // IPv4
            svc.sendPacket(PKT_BROADCAST);
            break;
        case 0x0806:  // ARP
            svc.sendPacket(PKT_BROADCAST);
            break;
        default:
            svc.dropPacket();
            break;
    }
}

Contribute — propose a file extension

Tell us where to find evidence about PacketC (mapped to pl/packetc). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/PacketC/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← packagist-pm Packlang →