code wiki / _hdl_build / nx_adnet_slot.nx
nx_adnet_slot.nx
buildroot/runtime/_hdl_build/nx_adnet_slot.nx
about
nx_adnet_slot.nx -- LIB: the UNIVERSAL site-wide ad slot for the sovereign ad network (nx_adnet core).
One labeled, first-party, zero-third-party-JS banner slot rendered per page (injected by hr_serve3_slot),
plus the first-party /ad/click/<id> redirect responder. PRIVACY BY CONSTRUCTION: no cookie, no visitor id,
per-AD counters only; rotation is TIME-based (no per-user frequency state -- per-user tracking is REFUSED).
Inventory conf rows (nx_adnet contract): id<TAB>advertiser<TAB>img<TAB>clickurl<TAB>section<TAB>weight
plus directive rows: @host<TAB><allowed-vhost> (FAIL-CLOSED: no @host row for the vhost -> no slot ever).
All parsing here is BOUNDED (rule 12 defensive-at-boundaries); a row that fails validation is DROPPED,
never served. Section falls back to rows with section 'any'. license_tier: ORIGINAL
dependencies 2 imports · 12 importers
diagram shows first 10 each side; +0 more imports, +2 more importers in the complete lists below.
imports: nx_syscalls.nxnx_adnet.nx
imported by: nx_adnet_apply.nxnx_adnet_campaign.nxnx_adnet_catalog.nxnx_adnet_compare_page.nxnx_adnet_creative.nxnx_adnet_crm.nxnx_adnet_dash.nxnx_adnet_invoice.nxnx_adnet_selfserve.nxnx_adnet_slot_gate.nxnx_adnet_view.nxnx_sites_daemon_v2.nx
structs
| none |
consts
| none |
functions
| 12 | func aslot_lc(c: u8) -> u8 { if c >= (65 as u8) { if c <= (90 as u8) { return (c + (32 as u8)) } } return c } called by 1: aslot_section_of |
| 14 | func aslot_starts(s: *u8, pre: *u8) -> i64 |
| 21 | func aslot_field_b(row: *u8, rlen: i64, idx: i64, out: *u8, cap: i64) -> i64 called by 18: camp_verdictcamp_row_spentcamp_row_budgetcamp_may_serveac_sectionac_inventory+12 calls 1: ad_tab |
| 34 | func aslot_section_of(path: *u8, pn: i64, out: *u8, cap: i64) -> i64 |
| 57 | func aslot_host_ok(inv: *u8, ilen: i64, host: *u8) -> i64 |
| 77 | func aslot_id_ok(id: *u8) -> i64 |
| 96 | func aslot_url_chars_ok(u: *u8) -> i64 |
| 113 | func aslot_img_ok(u: *u8) -> i64 |
| 120 | func aslot_click_ok(u: *u8) -> i64 |
| 130 | func aslot_cat_esc(dst: *u8, off: i64, s: *u8, cap: i64) -> i64 |
| 149 | func aslot_count(inv: *u8, ilen: i64, section: *u8) -> i64 |
| 170 | func aslot_pick_b(inv: *u8, ilen: i64, section: *u8, rot: i64, out: *u8, cap: i64) -> i64 |
| 206 | func aslot_html(inv: *u8, ilen: i64, path: *u8, pn: i64, rot: i64, out: *u8, cap: i64, idout: *u8) -> i64 |
| 248 | func aslot_click_target_b(inv: *u8, ilen: i64, ad_id: *u8, out: *u8, cap: i64) -> i64 |
| 271 | func aslot_click_resp(inv: *u8, ilen: i64, path: *u8, pn: i64, out: *u8, cap: i64, idout: *u8) -> i64 |