MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bpf_canwritebuf

Function bpf_canwritebuf

freebsd/net/bpf.c:448–458  ·  view source on GitHub ↗

* Allow the buffer model to indicate that the current store buffer is * immutable, regardless of the appearance of space. Return (1) if the * buffer is writable, and (0) if not. */

Source from the content-addressed store, hash-verified

446 * buffer is writable, and (0) if not.
447 */
448static int
449bpf_canwritebuf(struct bpf_d *d)
450{
451 BPFD_LOCK_ASSERT(d);
452
453 switch (d->bd_bufmode) {
454 case BPF_BUFMODE_ZBUF:
455 return (bpf_zerocopy_canwritebuf(d));
456 }
457 return (1);
458}
459
460/*
461 * Notify buffer model that an attempt to write to the store buffer has

Callers 2

reset_dFunction · 0.85
catchpacketFunction · 0.85

Calls 1

bpf_zerocopy_canwritebufFunction · 0.85

Tested by

no test coverage detected