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