Lines Matching full:mark
30 static int prog_load(__u32 idx, __u32 mark, __u32 prio) in prog_load() argument
48 /* set mark on socket */ in prog_load()
55 /* if uid is 0, use given mark, else use the uid as the mark */ in prog_load()
58 BPF_MOV64_IMM(BPF_REG_3, mark), in prog_load()
60 /* set the mark on the new socket */ in prog_load()
62 BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, mark)), in prog_load()
63 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, mark)), in prog_load()
87 if (mark) in prog_load()
107 if (mark) { in prog_load()
145 unsigned int mark = 0; in get_somark() local
146 socklen_t optlen = sizeof(mark); in get_somark()
149 rc = getsockopt(sd, SOL_SOCKET, SO_MARK, &mark, &optlen); in get_somark()
153 return mark; in get_somark()
171 unsigned int mark, prio; in show_sockopts() local
184 mark = get_somark(sd); in show_sockopts()
189 printf("sd %d: dev %s, mark %u, priority %u\n", sd, name, mark, prio); in show_sockopts()
198 printf(" %s -b bind-to-dev -m mark -p prio cg-path\n", argv0); in usage()
203 printf(" Show inherited socket settings (mark, priority, and device)\n"); in usage()
210 __u32 idx = 0, mark = 0, prio = 0; in main() local
233 mark = strtoumax(optarg, NULL, 0); in main()
255 if (do_attach && !idx && !mark && !prio) { in main()
257 "One of device, mark or priority must be given\n"); in main()
268 prog_fd = prog_load(idx, mark, prio); in main()