Debian Codegraph @

po/ar/man2/bpf.2.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.30.2\n"
8 "POT-Creation-Date: 2026-06-05 06:19+0200\n"
9 "PO-Revision-Date: 2026-05-17 17:42+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18 "X-Generator: Lokalize 23.08.5\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "bpf"
25 msgstr "bpf"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-10"
32 msgstr "10 فبراير 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "صفحات دليل لينكس 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "الاسم"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "bpf - perform a command on an extended BPF map or program"
51 msgstr "bpf - تنفيذ أمر على برنامج أو خريطة BPF ممتدة"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "SYNOPSIS"
58 msgstr "موجز"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 #, no-wrap
64 msgid "B<#include E<lt>linux/bpf.hE<gt>>\n"
65 msgstr "B<#include E<lt>linux/bpf.hE<gt>>\n"
66
67 #. type: Plain text
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "B<int bpf(int >I<cmd>B<, union bpf_attr *>I<attr>B<, unsigned int >I<size>B<);>\n"
72 msgstr "B<int bpf(int >I<cmd>B<, union bpf_attr *>I<attr>B<, unsigned int >I<size>B<);>\n"
73
74 #. type: SH
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "DESCRIPTION"
79 msgstr "الوصف"
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 msgid ""
85 "The B<bpf>() system call performs a range of operations related to extended "
86 "Berkeley Packet Filters. Extended BPF (or eBPF) is similar to the original "
87 "(\"classic\") BPF (cBPF) used to filter network packets. For both cBPF and "
88 "eBPF programs, the kernel statically analyzes the programs before loading "
89 "them, in order to ensure that they cannot harm the running system."
90 msgstr ""
91 "يُنفذ استدعاء النظام B<bpf>() مجموعة من العمليات المتعلقة بمرشحات حزم بيركلي "
92 "الممتدة (Berkeley Packet Filters). إن BPF الممتد (أو eBPF) مشابه لـ BPF "
93 "الأصلي (\"التقليدي\" أو cBPF) المستخدم لترشيح حزم الشبكة. وبالنسبة لبرامج "
94 "cBPF و eBPF معًا، تحلل النواة البرامج سكونيًا قبل تحميلها، وذلك لضمان عدم "
95 "إلحاقها الضرر بالنظام المشغل."
96
97 #. See 'enum bpf_func_id' in include/uapi/linux/bpf.h
98 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 msgid ""
102 "eBPF extends cBPF in multiple ways, including the ability to call a fixed "
103 "set of in-kernel helper functions (via the B<BPF_CALL> opcode extension "
104 "provided by eBPF) and access shared data structures such as eBPF maps."
105 msgstr ""
106 "يوسع eBPF نظام cBPF بطرق متعددة، بما في ذلك القدرة على استدعاء مجموعة ثابتة "
107 "من الدوال المساعدة داخل النواة (عبر امتداد شفرة العملية B<BPF_CALL> الذي "
108 "يوفره eBPF) والوصول إلى هياكل البيانات المشتركة مثل خرائط eBPF."
109
110 #. type: SS
111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
113 #, no-wrap
114 msgid "Extended BPF Design/Architecture"
115 msgstr "تصميم/معمارية BPF الممتد"
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 msgid ""
121 "eBPF maps are a generic data structure for storage of different data types. "
122 "Data types are generally treated as binary blobs, so a user just specifies "
123 "the size of the key and the size of the value at map-creation time. In "
124 "other words, a key/value for a given map can have an arbitrary structure."
125 msgstr ""
126 "خرائط eBPF هي هيكل بيانات عام لتخزين أنواع مختلفة من البيانات. تُعامل أنواع "
127 "البيانات عمومًا ككتل ثنائية، لذا يحدد المستخدم حجم المفتاح وحجم القيمة عند "
128 "وقت إنشاء الخريطة فقط. بمعنى آخر، يمكن أن يكون للمفتاح/القيمة في خريطة معينة "
129 "هيكل تعسفي."
130
131 #. type: Plain text
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 msgid ""
135 "A user process can create multiple maps (with key/value-pairs being opaque "
136 "bytes of data) and access them via file descriptors. Different eBPF "
137 "programs can access the same maps in parallel. It's up to the user process "
138 "and eBPF program to decide what they store inside maps."
139 msgstr ""
140 "يمكن لعملية المستخدم إنشاء خرائط متعددة (تكون فيها أزواج المفتاح/القيمة "
141 "عبارة عن بايتات بيانات مبهمة) والوصول إليها عبر واصفات الملفات. يمكن لبرامج "
142 "eBPF المختلفة الوصول إلى الخرائط نفسها بالتوازي. ويعود الأمر لعملية المستخدم "
143 "وبرنامج eBPF لتقرير ما سيخزن داخل الخرائط."
144
145 #. Defined by the kernel constant MAX_TAIL_CALL_CNT in include/linux/bpf.h
146 #. type: Plain text
147 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
148 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
149 msgid ""
150 "There's one special map type, called a program array. This type of map "
151 "stores file descriptors referring to other eBPF programs. When a lookup in "
152 "the map is performed, the program flow is redirected in-place to the "
153 "beginning of another eBPF program and does not return back to the calling "
154 "program. The level of nesting has a fixed limit of 32, so that infinite "
155 "loops cannot be crafted. At run time, the program file descriptors stored "
156 "in the map can be modified, so program functionality can be altered based on "
157 "specific requirements. All programs referred to in a program-array map must "
158 "have been previously loaded into the kernel via B<bpf>(). If a map lookup "
159 "fails, the current program continues its execution. See "
160 "B<BPF_MAP_TYPE_PROG_ARRAY> below for further details."
161 msgstr ""
162 "ثمة نوع خاص من الخرائط يسمى مصفوفة البرامج. يخزن هذا النوع من الخرائط واصفات "
163 "ملفات تشير إلى برامج eBPF أخرى. عند إجراء بحث في الخريطة، يُعاد توجيه تدفق "
164 "البرنامج في مكانه إلى بداية برنامج eBPF آخر ولا يعود إلى البرنامج المستدعِي. "
165 "لمستوى التعشيش حد ثابت هو 32، حتى لا يمكن صياغة حلقات لانهائية. في وقت "
166 "التشغيل، يمكن تعديل واصفات ملفات البرامج المخزنة في الخريطة، وبذلك يمكن "
167 "تغيير وظائف البرنامج بناءً على متطلبات محددة. يجب أن تكون جميع البرامج المشار "
168 "إليها في خريطة مصفوفة البرامج قد حُمّلت مسبقًا في النواة عبر B<bpf>(). إذا فشل "
169 "البحث في الخريطة، يكمل البرنامج الحالي تنفيذه. انظر "
170 "B<BPF_MAP_TYPE_PROG_ARRAY> أدناه لمزيد من التفاصيل."
171
172 #. type: Plain text
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 msgid ""
176 "Generally, eBPF programs are loaded by the user process and automatically "
177 "unloaded when the process exits. In some cases, for example, B<tc-bpf>(8), "
178 "the program will continue to stay alive inside the kernel even after the "
179 "process that loaded the program exits. In that case, the tc subsystem holds "
180 "a reference to the eBPF program after the file descriptor has been closed by "
181 "the user-space program. Thus, whether a specific program continues to live "
182 "inside the kernel depends on how it is further attached to a given kernel "
183 "subsystem after it was loaded via B<bpf>()."
184 msgstr ""
185 "عمومًا، تُحمّل برامج eBPF بواسطة عملية المستخدم وتُفرّغ آليًا عند خروج العملية. في "
186 "بعض الحالات، مثل B<tc-bpf>(8)، سيستمر البرنامج حيًا داخل النواة حتى بعد خروج "
187 "العملية التي حمّلت البرنامج. في هذه الحالة، يحتفظ نظام tc الفرعي بمرجع "
188 "لبرنامج eBPF بعد أن يُغلق واصف الملف بواسطة برنامج مساحة المستخدم. وبالتالي، "
189 "فإن بقاء برنامج معين داخل النواة يعتمد على كيفية ربطه بنظام فرعي معين للنواة "
190 "بعد تحميله عبر B<bpf>()."
191
192 #. type: Plain text
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 msgid ""
196 "Each eBPF program is a set of instructions that is safe to run until its "
197 "completion. An in-kernel verifier statically determines that the eBPF "
198 "program terminates and is safe to execute. During verification, the kernel "
199 "increments reference counts for each of the maps that the eBPF program uses, "
200 "so that the attached maps can't be removed until the program is unloaded."
201 msgstr ""
202 "كل برنامج eBPF هو مجموعة من التعليمات الآمن تشغيلها حتى اكتمالها. يحدد مدقق "
203 "داخل النواة سكونيًا أن برنامج eBPF ينتهي وأنه آمن للتنفيذ. أثناء التحقق، تزيد "
204 "النواة عدادات المراجع لكل خريطة يستخدمها برنامج eBPF، بحيث لا يمكن إزالة "
205 "الخرائط المتصلة حتى يُفرّغ البرنامج."
206
207 #. type: Plain text
208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
210 msgid ""
211 "eBPF programs can be attached to different events. These events can be the "
212 "arrival of network packets, tracing events, classification events by network "
213 "queueing disciplines (for eBPF programs attached to a B<tc>(8) classifier), "
214 "and other types that may be added in the future. A new event triggers "
215 "execution of the eBPF program, which may store information about the event "
216 "in eBPF maps. Beyond storing data, eBPF programs may call a fixed set of in-"
217 "kernel helper functions."
218 msgstr ""
219 "يمكن ربط برامج eBPF بأحداث مختلفة. قد تكون هذه الأحداث وصول حزم الشبكة، أو "
220 "أحداث التتبع، أو أحداث التصنيف بواسطة ضوابط طوابير الشبكة (لبرامج eBPF "
221 "المربوطة بمصنف B<tc>(8))، وأنواع أخرى قد تُضاف مستقبلاً. يقدح الحدث الجديد "
222 "تنفيذ برنامج eBPF، والذي قد يخزن معلومات عن الحدث في خرائط eBPF. وإلى جانب "
223 "تخزين البيانات، قد تستدعي برامج eBPF مجموعة ثابتة من الدوال المساعدة داخل "
224 "النواة."
225
226 #. type: Plain text
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 msgid ""
230 "The same eBPF program can be attached to multiple events and different eBPF "
231 "programs can access the same map:"
232 msgstr ""
233 "يمكن ربط برنامج eBPF نفسه بأحداث متعددة، ويمكن لبرامج eBPF مختلفة الوصول إلى "
234 "الخريطة ذاتها:"
235
236 #. type: Plain text
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid ""
241 "tracing tracing tracing packet packet packet\n"
242 "event A event B event C on eth0 on eth1 on eth2\n"
243 " | | | | | \\[ha]\n"
244 " | | | | v |\n"
245 " --E<gt> tracing E<lt>-- tracing socket tc ingress tc egress\n"
246 " prog_1 prog_2 prog_3 classifier action\n"
247 " | | | | prog_4 prog_5\n"
248 " |--- -----| |------| map_3 | |\n"
249 " map_1 map_2 --| map_4 |--\n"
250 msgstr ""
251 "tracing tracing tracing packet packet packet\n"
252 "event A event B event C on eth0 on eth1 on eth2\n"
253 " | | | | | \\[ha]\n"
254 " | | | | v |\n"
255 " --E<gt> tracing E<lt>-- tracing socket tc ingress tc egress\n"
256 " prog_1 prog_2 prog_3 classifier action\n"
257 " | | | | prog_4 prog_5\n"
258 " |--- -----| |------| map_3 | |\n"
259 " map_1 map_2 --| map_4 |--\n"
260
261 #. type: SS
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "Arguments"
266 msgstr "المعطيات"
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid ""
272 "The operation to be performed by the B<bpf>() system call is determined by "
273 "the I<cmd> argument. Each operation takes an accompanying argument, "
274 "provided via I<attr>, which is a pointer to a union of type I<bpf_attr> (see "
275 "below). The unused fields and padding must be zeroed out before the call. "
276 "The I<size> argument is the size of the union pointed to by I<attr>."
277 msgstr ""
278 "تُحدد العملية المطلوب تنفيذها بواسطة استدعاء النظام B<bpf>() عبر المعطى "
279 "I<cmd>. تأخذ كل عملية معطى مصاحبًا يُوفر عبر I<attr>، وهو مؤشر إلى اتحاد "
280 "(union) من النوع I<bpf_attr> (انظر أدناه). يجب تصفير الحقول غير المستخدمة "
281 "والحشوات (padding) قبل الاستدعاء. المعطى I<size> هو حجم الاتحاد الذي يشير "
282 "إليه I<attr>."
283
284 #. type: Plain text
285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
287 msgid "The value provided in I<cmd> is one of the following:"
288 msgstr "القيمة المقدمة في I<cmd> هي واحدة مما يلي:"
289
290 #. type: TP
291 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
292 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
293 #, no-wrap
294 msgid "B<BPF_MAP_CREATE>"
295 msgstr "B<BPF_MAP_CREATE>"
296
297 #. type: Plain text
298 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
299 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
300 msgid ""
301 "Create a map and return a file descriptor that refers to the map. The close-"
302 "on-exec file descriptor flag (see B<fcntl>(2)) is automatically enabled for "
303 "the new file descriptor."
304 msgstr ""
305 "إنشاء خريطة وإرجاع واصف ملف يشير إليها. يُفعّل علم واصف ملف الإغلاق عند "
306 "التنفيذ (انظر B<fcntl>(2)) آليًا لواصف الملف الجديد."
307
308 #. type: TP
309 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
310 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
311 #, no-wrap
312 msgid "B<BPF_MAP_LOOKUP_ELEM>"
313 msgstr "B<BPF_MAP_LOOKUP_ELEM>"
314
315 #. type: Plain text
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 msgid "Look up an element by key in a specified map and return its value."
319 msgstr "البحث عن عنصر بواسطة المفتاح في خريطة محددة وإرجاع قيمته."
320
321 #. type: TP
322 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
323 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
324 #, no-wrap
325 msgid "B<BPF_MAP_UPDATE_ELEM>"
326 msgstr "B<BPF_MAP_UPDATE_ELEM>"
327
328 #. type: Plain text
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 msgid "Create or update an element (key/value pair) in a specified map."
332 msgstr "إنشاء عنصر أو تحديثه (زوج مفتاح/قيمة) في خريطة محددة."
333
334 #. type: TP
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 #, no-wrap
338 msgid "B<BPF_MAP_DELETE_ELEM>"
339 msgstr "B<BPF_MAP_DELETE_ELEM>"
340
341 #. type: Plain text
342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
344 msgid "Look up and delete an element by key in a specified map."
345 msgstr "البحث عن عنصر بواسطة المفتاح وحذفه في خريطة محددة."
346
347 #. type: TP
348 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
349 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
350 #, no-wrap
351 msgid "B<BPF_MAP_GET_NEXT_KEY>"
352 msgstr "B<BPF_MAP_GET_NEXT_KEY>"
353
354 #. type: Plain text
355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
357 msgid ""
358 "Look up an element by key in a specified map and return the key of the next "
359 "element."
360 msgstr ""
361 "البحث عن عنصر بواسطة المفتاح في خريطة محددة وإرجاع مفتاح العنصر التالي."
362
363 #. type: TP
364 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
365 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
366 #, no-wrap
367 msgid "B<BPF_PROG_LOAD>"
368 msgstr "B<BPF_PROG_LOAD>"
369
370 #. type: Plain text
371 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
372 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
373 msgid ""
374 "Verify and load an eBPF program, returning a new file descriptor associated "
375 "with the program. The close-on-exec file descriptor flag (see B<fcntl>(2)) "
376 "is automatically enabled for the new file descriptor."
377 msgstr ""
378 "التحقق من برنامج eBPF وتحميله، مع إرجاع واصف ملف جديد مرتبط بالبرنامج. يُفعّل "
379 "علم واصف ملف الإغلاق عند التنفيذ (انظر B<fcntl>(2)) آليًا لواصف الملف الجديد."
380
381 #. type: Plain text
382 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
383 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
384 msgid ""
385 "The I<bpf_attr> union consists of various anonymous structures that are used "
386 "by different B<bpf>() commands:"
387 msgstr ""
388 "يتكون اتحاد I<bpf_attr> من هياكل مجهولة مختلفة تُستخدم بواسطة أوامر B<bpf>() "
389 "المختلفة:"
390
391 #. commit 2541517c32be2531e0da59dfd7efc1ce844644f5
392 #. type: Plain text
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 #, no-wrap
396 msgid ""
397 "union bpf_attr {\n"
398 " struct { /* Used by BPF_MAP_CREATE */\n"
399 " __u32 map_type;\n"
400 " __u32 key_size; /* size of key in bytes */\n"
401 " __u32 value_size; /* size of value in bytes */\n"
402 " __u32 max_entries; /* maximum number of entries\n"
403 " in a map */\n"
404 " };\n"
405 "\\&\n"
406 " struct { /* Used by BPF_MAP_*_ELEM and BPF_MAP_GET_NEXT_KEY\n"
407 " commands */\n"
408 " __u32 map_fd;\n"
409 " __aligned_u64 key;\n"
410 " union {\n"
411 " __aligned_u64 value;\n"
412 " __aligned_u64 next_key;\n"
413 " };\n"
414 " __u64 flags;\n"
415 " };\n"
416 "\\&\n"
417 " struct { /* Used by BPF_PROG_LOAD */\n"
418 " __u32 prog_type;\n"
419 " __u32 insn_cnt;\n"
420 " __aligned_u64 insns; /* \\[aq]const struct bpf_insn *\\[aq] */\n"
421 " __aligned_u64 license; /* \\[aq]const char *\\[aq] */\n"
422 " __u32 log_level; /* verbosity level of verifier */\n"
423 " __u32 log_size; /* size of user buffer */\n"
424 " __aligned_u64 log_buf; /* user supplied \\[aq]char *\\[aq]\n"
425 " buffer */\n"
426 " __u32 kern_version;\n"
427 " /* checked when prog_type=kprobe\n"
428 " (since Linux 4.1) */\n"
429 " };\n"
430 "} __attribute__((aligned(8)));\n"
431 msgstr ""
432 "union bpf_attr {\n"
433 " struct { /* تُستخدم بواسطة BPF_MAP_CREATE */\n"
434 " __u32 map_type;\n"
435 " __u32 key_size; /* حجم المفتاح بالبايت */\n"
436 " __u32 value_size; /* حجم القيمة بالبايت */\n"
437 " __u32 max_entries; /* أقصى عدد من المدخلات\n"
438 " في الخريطة */\n"
439 " };\n"
440 "\\&\n"
441 " struct { /* تُستخدم بواسطة أوامر BPF_MAP_*_ELEM و BPF_MAP_GET_NEXT_KEY */\n"
442 " __u32 map_fd;\n"
443 " __aligned_u64 key;\n"
444 " union {\n"
445 " __aligned_u64 value;\n"
446 " __aligned_u64 next_key;\n"
447 " };\n"
448 " __u64 flags;\n"
449 " };\n"
450 "\\&\n"
451 " struct { /* تُستخدم بواسطة BPF_PROG_LOAD */\n"
452 " __u32 prog_type;\n"
453 " __u32 insn_cnt;\n"
454 " __aligned_u64 insns; /* \\[aq]const struct bpf_insn *\\[aq] */\n"
455 " __aligned_u64 license; /* \\[aq]const char *\\[aq] */\n"
456 " __u32 log_level; /* مستوى إسهاب المدقق */\n"
457 " __u32 log_size; /* حجم مخزن المستخدم المؤقت */\n"
458 " __aligned_u64 log_buf; /* مخزن \\[aq]char *\\[aq] المؤقت\n"
459 " الذي يوفره المستخدم */\n"
460 " __u32 kern_version;\n"
461 " /* يُفحص عندما prog_type=kprobe\n"
462 " (منذ لينكس 4.1) */\n"
463 " };\n"
464 "} __attribute__((aligned(8)));\n"
465
466 #. type: SS
467 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
468 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
469 #, no-wrap
470 msgid "eBPF maps"
471 msgstr "خرائط eBPF"
472
473 #. type: Plain text
474 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
475 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
476 msgid ""
477 "Maps are a generic data structure for storage of different types of data. "
478 "They allow sharing of data between eBPF kernel programs, and also between "
479 "kernel and user-space applications."
480 msgstr ""
481 "الخرائط هي هيكل بيانات عام لتخزين أنواع مختلفة من البيانات. وهي تتيح مشاركة "
482 "البيانات بين برامج eBPF في النواة، وكذلك بين النواة وتطبيقات مساحة المستخدم."
483
484 #. type: Plain text
485 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
486 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
487 msgid "Each map type has the following attributes:"
488 msgstr "لكل نوع خريطة السمات التالية:"
489
490 #. type: IP
491 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
492 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
493 #, no-wrap
494 msgid "\\[bu]"
495 msgstr "\\[bu]"
496
497 #. type: Plain text
498 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
499 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
500 msgid "type"
501 msgstr "النوع"
502
503 #. type: Plain text
504 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
505 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
506 msgid "maximum number of elements"
507 msgstr "أقصى عدد من العناصر"
508
509 #. type: Plain text
510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
512 msgid "key size in bytes"
513 msgstr "حجم المفتاح بالبايت"
514
515 #. type: Plain text
516 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
517 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
518 msgid "value size in bytes"
519 msgstr "حجم القيمة بالبايت"
520
521 #. type: Plain text
522 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
523 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
524 msgid ""
525 "The following wrapper functions demonstrate how various B<bpf>() commands "
526 "can be used to access the maps. The functions use the I<cmd> argument to "
527 "invoke different operations."
528 msgstr ""
529 "توضح الدوال المغلفة التالية كيفية استخدام أوامر B<bpf>() المختلفة للوصول إلى "
530 "الخرائط. تستخدم الدوال المعطى I<cmd> لاستدعاء عمليات مختلفة."
531
532 #. type: Plain text
533 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
534 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
535 msgid ""
536 "The B<BPF_MAP_CREATE> command creates a new map, returning a new file "
537 "descriptor that refers to the map."
538 msgstr ""
539 "يُنشئ الأمر B<BPF_MAP_CREATE> خريطة جديدة، ويُرجع واصف ملف جديد يشير إلى "
540 "الخريطة."
541
542 #. type: Plain text
543 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
544 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
545 #, no-wrap
546 msgid ""
547 "int\n"
548 "bpf_create_map(enum bpf_map_type map_type,\n"
549 " unsigned int key_size,\n"
550 " unsigned int value_size,\n"
551 " unsigned int max_entries)\n"
552 "{\n"
553 " union bpf_attr attr = {\n"
554 " .map_type = map_type,\n"
555 " .key_size = key_size,\n"
556 " .value_size = value_size,\n"
557 " .max_entries = max_entries\n"
558 " };\n"
559 "\\&\n"
560 " return bpf(BPF_MAP_CREATE, &attr, sizeof(attr));\n"
561 "}\n"
562 msgstr ""
563 "int\n"
564 "bpf_create_map(enum bpf_map_type map_type,\n"
565 " unsigned int key_size,\n"
566 " unsigned int value_size,\n"
567 " unsigned int max_entries)\n"
568 "{\n"
569 " union bpf_attr attr = {\n"
570 " .map_type = map_type,\n"
571 " .key_size = key_size,\n"
572 " .value_size = value_size,\n"
573 " .max_entries = max_entries\n"
574 " };\n"
575 "\\&\n"
576 " return bpf(BPF_MAP_CREATE, &attr, sizeof(attr));\n"
577 "}\n"
578
579 #. type: Plain text
580 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
581 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
582 msgid ""
583 "The new map has the type specified by I<map_type>, and attributes as "
584 "specified in I<key_size>, I<value_size>, and I<max_entries>. On success, "
585 "this operation returns a file descriptor. On error, -1 is returned and "
586 "I<errno> is set to B<EINVAL>, B<EPERM>, or B<ENOMEM>."
587 msgstr ""
588 "للخريطة الجديدة النوع المحدد بواسطة I<map_type>، والسمات المحددة في "
589 "I<key_size> و I<value_size> و I<max_entries>. عند النجاح، تُرجع هذه العملية "
590 "واصف ملف. عند حدوث خطأ، يُرجع -1 ويُضبط I<errno> على B<EINVAL> أو B<EPERM> أو "
591 "B<ENOMEM>."
592
593 #. type: Plain text
594 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
595 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
596 msgid ""
597 "The I<key_size> and I<value_size> attributes will be used by the verifier "
598 "during program loading to check that the program is calling "
599 "B<bpf_map_*_elem>() helper functions with a correctly initialized I<key> "
600 "and to check that the program doesn't access the map element I<value> beyond "
601 "the specified I<value_size>. For example, when a map is created with a "
602 "I<key_size> of 8 and the eBPF program calls"
603 msgstr ""
604 "ستُستخدم سمتا I<key_size> و I<value_size> بواسطة المدقق أثناء تحميل البرنامج "
605 "للتحقق من أن البرنامج يستدعي الدوال المساعدة B<bpf_map_*_elem>() مع I<key> "
606 "مُهيأ بشكل صحيح وللتحقق من أن البرنامج لا يصل إلى عنصر الخريطة I<value> بما "
607 "يتجاوز I<value_size> المحدد. على سبيل المثال، عندما تُنشأ خريطة بـ "
608 "I<key_size> قدره 8 ويستدعي برنامج eBPF"
609
610 #. type: Plain text
611 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
612 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
613 #, no-wrap
614 msgid "bpf_map_lookup_elem(map_fd, fp - 4)\n"
615 msgstr "bpf_map_lookup_elem(map_fd, fp - 4)\n"
616
617 #. type: Plain text
618 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
619 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
620 msgid "the program will be rejected, since the in-kernel helper function"
621 msgstr "سيُرفض البرنامج، لأن الدالة المساعدة داخل النواة"
622
623 #. type: Plain text
624 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
625 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
626 #, no-wrap
627 msgid "bpf_map_lookup_elem(map_fd, void *key)\n"
628 msgstr "bpf_map_lookup_elem(map_fd, void *key)\n"
629
630 #. type: Plain text
631 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
632 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
633 msgid ""
634 "expects to read 8 bytes from the location pointed to by I<key>, but the "
635 "I<fp\\ -\\ 4> (where I<fp> is the top of the stack) starting address will "
636 "cause out-of-bounds stack access."
637 msgstr ""
638 "تتوقع قراءة 8 بايت من الموقع الذي يشير إليه I<key>، لكن عنوان البدء I<fp\\ -"
639 "\\ 4> (حيث I<fp> هو قمة المكدس) سيؤدي إلى وصول للمكدس خارج الحدود."
640
641 #. type: Plain text
642 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
643 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
644 msgid ""
645 "Similarly, when a map is created with a I<value_size> of 1 and the eBPF "
646 "program contains"
647 msgstr ""
648 "وبالمثل، عندما تُنشأ خريطة بـ I<value_size> قدره 1 ويحتوي برنامج eBPF على"
649
650 #. type: Plain text
651 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
652 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
653 #, no-wrap
654 msgid ""
655 "value = bpf_map_lookup_elem(...);\n"
656 "*(u32 *) value = 1;\n"
657 msgstr ""
658 "value = bpf_map_lookup_elem(...);\n"
659 "*(u32 *) value = 1;\n"
660
661 #. type: Plain text
662 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
663 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
664 msgid ""
665 "the program will be rejected, since it accesses the I<value> pointer beyond "
666 "the specified 1 byte I<value_size> limit."
667 msgstr ""
668 "سيُرفض البرنامج، لأنه يصل إلى مؤشر I<value> بما يتجاوز حد 1 بايت لـ "
669 "I<value_size> المحدد."
670
671 #. type: Plain text
672 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
673 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
674 msgid "Currently, the following values are supported for I<map_type>:"
675 msgstr "حاليًا، القيم التالية مدعومة لـ I<map_type>:"
676
677 #. type: Plain text
678 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
679 #: opensuse-tumbleweed
680 #, no-wrap
681 msgid ""
682 "enum bpf_map_type {\n"
683 " BPF_MAP_TYPE_UNSPEC, /* Reserve 0 as invalid map type */\n"
684 " BPF_MAP_TYPE_HASH,\n"
685 " BPF_MAP_TYPE_ARRAY,\n"
686 " BPF_MAP_TYPE_PROG_ARRAY,\n"
687 " BPF_MAP_TYPE_PERF_EVENT_ARRAY,\n"
688 " BPF_MAP_TYPE_PERCPU_HASH,\n"
689 " BPF_MAP_TYPE_PERCPU_ARRAY,\n"
690 " BPF_MAP_TYPE_STACK_TRACE,\n"
691 " BPF_MAP_TYPE_CGROUP_ARRAY,\n"
692 " BPF_MAP_TYPE_LRU_HASH,\n"
693 " BPF_MAP_TYPE_LRU_PERCPU_HASH,\n"
694 " BPF_MAP_TYPE_LPM_TRIE,\n"
695 " BPF_MAP_TYPE_ARRAY_OF_MAPS,\n"
696 " BPF_MAP_TYPE_HASH_OF_MAPS,\n"
697 " BPF_MAP_TYPE_DEVMAP,\n"
698 " BPF_MAP_TYPE_SOCKMAP,\n"
699 " BPF_MAP_TYPE_CPUMAP,\n"
700 " BPF_MAP_TYPE_XSKMAP,\n"
701 " BPF_MAP_TYPE_SOCKHASH,\n"
702 " BPF_MAP_TYPE_CGROUP_STORAGE,\n"
703 " BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,\n"
704 " BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,\n"
705 " BPF_MAP_TYPE_QUEUE,\n"
706 " BPF_MAP_TYPE_STACK,\n"
707 " /* See /usr/include/linux/bpf.h for the full list. */\n"
708 "};\n"
709 msgstr ""
710 "enum bpf_map_type {\n"
711 " BPF_MAP_TYPE_UNSPEC, /* حجز 0 كنوع خريطة غير صالح */\n"
712 " BPF_MAP_TYPE_HASH,\n"
713 " BPF_MAP_TYPE_ARRAY,\n"
714 " BPF_MAP_TYPE_PROG_ARRAY,\n"
715 " BPF_MAP_TYPE_PERF_EVENT_ARRAY,\n"
716 " BPF_MAP_TYPE_PERCPU_HASH,\n"
717 " BPF_MAP_TYPE_PERCPU_ARRAY,\n"
718 " BPF_MAP_TYPE_STACK_TRACE,\n"
719 " BPF_MAP_TYPE_CGROUP_ARRAY,\n"
720 " BPF_MAP_TYPE_LRU_HASH,\n"
721 " BPF_MAP_TYPE_LRU_PERCPU_HASH,\n"
722 " BPF_MAP_TYPE_LPM_TRIE,\n"
723 " BPF_MAP_TYPE_ARRAY_OF_MAPS,\n"
724 " BPF_MAP_TYPE_HASH_OF_MAPS,\n"
725 " BPF_MAP_TYPE_DEVMAP,\n"
726 " BPF_MAP_TYPE_SOCKMAP,\n"
727 " BPF_MAP_TYPE_CPUMAP,\n"
728 " BPF_MAP_TYPE_XSKMAP,\n"
729 " BPF_MAP_TYPE_SOCKHASH,\n"
730 " BPF_MAP_TYPE_CGROUP_STORAGE,\n"
731 " BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,\n"
732 " BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,\n"
733 " BPF_MAP_TYPE_QUEUE,\n"
734 " BPF_MAP_TYPE_STACK,\n"
735 " /* انظر /usr/include/linux/bpf.h للقائمة الكاملة. */\n"
736 "};\n"
737
738 #. FIXME We need an explanation of why one might choose each of
739 #. these map implementations
740 #. type: Plain text
741 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
742 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
743 msgid ""
744 "I<map_type> selects one of the available map implementations in the kernel. "
745 "For all map types, eBPF programs access maps with the same "
746 "B<bpf_map_lookup_elem>() and B<bpf_map_update_elem>() helper functions. "
747 "Further details of the various map types are given below."
748 msgstr ""
749 "يختار I<map_type> أحد تطبيقات الخرائط المتاحة في النواة. بالنسبة لجميع أنواع "
750 "الخرائط، تصل برامج eBPF إلى الخرائط باستخدام نفس الدوال المساعدة "
751 "B<bpf_map_lookup_elem>() و B<bpf_map_update_elem>(). ترد مزيد من التفاصيل "
752 "حول أنواع الخرائط المختلفة أدناه."
753
754 #. type: Plain text
755 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
756 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
757 msgid ""
758 "The B<BPF_MAP_LOOKUP_ELEM> command looks up an element with a given I<key> "
759 "in the map referred to by the file descriptor I<fd>."
760 msgstr ""
761 "يبحث الأمر B<BPF_MAP_LOOKUP_ELEM> عن عنصر بـ I<key> معين في الخريطة التي "
762 "يشير إليها واصف الملف I<fd>."
763
764 #. type: Plain text
765 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
766 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
767 #, no-wrap
768 msgid ""
769 "int\n"
770 "bpf_lookup_elem(int fd, const void *key, void *value)\n"
771 "{\n"
772 " union bpf_attr attr = {\n"
773 " .map_fd = fd,\n"
774 " .key = ptr_to_u64(key),\n"
775 " .value = ptr_to_u64(value),\n"
776 " };\n"
777 "\\&\n"
778 " return bpf(BPF_MAP_LOOKUP_ELEM, &attr, sizeof(attr));\n"
779 "}\n"
780 msgstr ""
781 "int\n"
782 "bpf_lookup_elem(int fd, const void *key, void *value)\n"
783 "{\n"
784 " union bpf_attr attr = {\n"
785 " .map_fd = fd,\n"
786 " .key = ptr_to_u64(key),\n"
787 " .value = ptr_to_u64(value),\n"
788 " };\n"
789 "\\&\n"
790 " return bpf(BPF_MAP_LOOKUP_ELEM, &attr, sizeof(attr));\n"
791 "}\n"
792
793 #. type: Plain text
794 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
795 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
796 msgid ""
797 "If an element is found, the operation returns zero and stores the element's "
798 "value into I<value>, which must point to a buffer of I<value_size> bytes."
799 msgstr ""
800 "إذا عُثر على عنصر، تُرجع العملية صفرًا وتخزن قيمة العنصر في I<value>، والذي يجب "
801 "أن يشير إلى مخزن مؤقت بحجم I<value_size> بايت."
802
803 #. type: Plain text
804 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
805 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
806 msgid ""
807 "If no element is found, the operation returns -1 and sets I<errno> to "
808 "B<ENOENT>."
809 msgstr "إذا لم يُعثر على أي عنصر، تُرجع العملية -1 وتُضبط I<errno> على B<ENOENT>."
810
811 #. type: Plain text
812 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
813 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
814 msgid ""
815 "The B<BPF_MAP_UPDATE_ELEM> command creates or updates an element with a "
816 "given I<key/value> in the map referred to by the file descriptor I<fd>."
817 msgstr ""
818 "يُنشئ الأمر B<BPF_MAP_UPDATE_ELEM> عنصرًا أو يحدثه بـ I<key/value> معطيين في "
819 "الخريطة التي يشير إليها واصف الملف I<fd>."
820
821 #. type: Plain text
822 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
823 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
824 #, no-wrap
825 msgid ""
826 "int\n"
827 "bpf_update_elem(int fd, const void *key, const void *value,\n"
828 " uint64_t flags)\n"
829 "{\n"
830 " union bpf_attr attr = {\n"
831 " .map_fd = fd,\n"
832 " .key = ptr_to_u64(key),\n"
833 " .value = ptr_to_u64(value),\n"
834 " .flags = flags,\n"
835 " };\n"
836 "\\&\n"
837 " return bpf(BPF_MAP_UPDATE_ELEM, &attr, sizeof(attr));\n"
838 "}\n"
839 msgstr ""
840 "int\n"
841 "bpf_update_elem(int fd, const void *key, const void *value,\n"
842 " uint64_t flags)\n"
843 "{\n"
844 " union bpf_attr attr = {\n"
845 " .map_fd = fd,\n"
846 " .key = ptr_to_u64(key),\n"
847 " .value = ptr_to_u64(value),\n"
848 " .flags = flags,\n"
849 " };\n"
850 "\\&\n"
851 " return bpf(BPF_MAP_UPDATE_ELEM, &attr, sizeof(attr));\n"
852 "}\n"
853
854 #. type: Plain text
855 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
856 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
857 msgid "The I<flags> argument should be specified as one of the following:"
858 msgstr "يجب تحديد المعطى I<flags> كواحد مما يلي:"
859
860 #. type: TP
861 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
862 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
863 #, no-wrap
864 msgid "B<BPF_ANY>"
865 msgstr "B<BPF_ANY>"
866
867 #. type: Plain text
868 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
869 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
870 msgid "Create a new element or update an existing element."
871 msgstr "إنشاء عنصر جديد أو تحديث عنصر موجود."
872
873 #. type: TP
874 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
875 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
876 #, no-wrap
877 msgid "B<BPF_NOEXIST>"
878 msgstr "B<BPF_NOEXIST>"
879
880 #. type: Plain text
881 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
882 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
883 msgid "Create a new element only if it did not exist."
884 msgstr "أنشئ عنصراً جديداً فقط إذا لم يكن موجوداً."
885
886 #. type: TP
887 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
888 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
889 #, no-wrap
890 msgid "B<BPF_EXIST>"
891 msgstr "B<BPF_EXIST>"
892
893 #. type: Plain text
894 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
895 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
896 msgid "Update an existing element."
897 msgstr "حدّث عنصراً موجوداً بالفعل."
898
899 #. type: Plain text
900 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
901 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
902 msgid ""
903 "On success, the operation returns zero. On error, -1 is returned and "
904 "I<errno> is set to B<EINVAL>, B<EPERM>, B<ENOMEM>, or B<E2BIG>. B<E2BIG> "
905 "indicates that the number of elements in the map reached the I<max_entries> "
906 "limit specified at map creation time. B<EEXIST> will be returned if "
907 "I<flags> specifies B<BPF_NOEXIST> and the element with I<key> already exists "
908 "in the map. B<ENOENT> will be returned if I<flags> specifies B<BPF_EXIST> "
909 "and the element with I<key> doesn't exist in the map."
910 msgstr ""
911 "عند النجاح، تُعيد العملية صفراً. عند حدوث خطأ، يُعاد -1 ويُضبط I<errno> على "
912 "B<EINVAL>، أو B<EPERM>، أو B<ENOMEM>، أو B<E2BIG>. تشير B<E2BIG> إلى أن عدد "
913 "العناصر في الخريطة قد وصل إلى حد I<max_entries> المحدد وقت إنشاء الخريطة. "
914 "تُعاد B<EEXIST> إذا حددت I<flags> القيمة B<BPF_NOEXIST> وكان العنصر ذو "
915 "المفتاح I<key> موجوداً بالفعل في الخريطة. وتُعاد B<ENOENT> إذا حددت I<flags> "
916 "القيمة B<BPF_EXIST> وكان العنصر ذو المفتاح I<key> غير موجود في الخريطة."
917
918 #. type: Plain text
919 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
920 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
921 msgid ""
922 "The B<BPF_MAP_DELETE_ELEM> command deletes the element whose key is I<key> "
923 "from the map referred to by the file descriptor I<fd>."
924 msgstr ""
925 "يحذف الأمر B<BPF_MAP_DELETE_ELEM> العنصر الذي مفتاحه I<key> من الخريطة "
926 "المشار إليها بواسطة واصف الملف I<fd>."
927
928 #. type: Plain text
929 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
930 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
931 #, no-wrap
932 msgid ""
933 "int\n"
934 "bpf_delete_elem(int fd, const void *key)\n"
935 "{\n"
936 " union bpf_attr attr = {\n"
937 " .map_fd = fd,\n"
938 " .key = ptr_to_u64(key),\n"
939 " };\n"
940 "\\&\n"
941 " return bpf(BPF_MAP_DELETE_ELEM, &attr, sizeof(attr));\n"
942 "}\n"
943 msgstr ""
944 "int\n"
945 "bpf_delete_elem(int fd, const void *key)\n"
946 "{\n"
947 " union bpf_attr attr = {\n"
948 " .map_fd = fd,\n"
949 " .key = ptr_to_u64(key),\n"
950 " };\n"
951 "\\&\n"
952 " return bpf(BPF_MAP_DELETE_ELEM, &attr, sizeof(attr));\n"
953 "}\n"
954
955 #. type: Plain text
956 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
957 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
958 msgid ""
959 "On success, zero is returned. If the element is not found, -1 is returned "
960 "and I<errno> is set to B<ENOENT>."
961 msgstr ""
962 "عند النجاح، يُعاد صفر. إذا لم يُعثر على العنصر، يُعاد -1 ويُضبط I<errno> على "
963 "B<ENOENT>."
964
965 #. type: Plain text
966 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
967 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
968 msgid ""
969 "The B<BPF_MAP_GET_NEXT_KEY> command looks up an element by I<key> in the map "
970 "referred to by the file descriptor I<fd> and sets the I<next_key> pointer to "
971 "the key of the next element."
972 msgstr ""
973 "يبحث الأمر B<BPF_MAP_GET_NEXT_KEY> عن عنصر بواسطة I<key> في الخريطة المشار "
974 "إليها بواسطة واصف الملف I<fd> ويضبط مؤشر I<next_key> على مفتاح العنصر التالي."
975
976 #. type: Plain text
977 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
978 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
979 #, no-wrap
980 msgid ""
981 "int\n"
982 "bpf_get_next_key(int fd, const void *key, void *next_key)\n"
983 "{\n"
984 " union bpf_attr attr = {\n"
985 " .map_fd = fd,\n"
986 " .key = ptr_to_u64(key),\n"
987 " .next_key = ptr_to_u64(next_key),\n"
988 " };\n"
989 "\\&\n"
990 " return bpf(BPF_MAP_GET_NEXT_KEY, &attr, sizeof(attr));\n"
991 "}\n"
992 msgstr ""
993 "int\n"
994 "bpf_get_next_key(int fd, const void *key, void *next_key)\n"
995 "{\n"
996 " union bpf_attr attr = {\n"
997 " .map_fd = fd,\n"
998 " .key = ptr_to_u64(key),\n"
999 " .next_key = ptr_to_u64(next_key),\n"
1000 " };\n"
1001 "\\&\n"
1002 " return bpf(BPF_MAP_GET_NEXT_KEY, &attr, sizeof(attr));\n"
1003 "}\n"
1004
1005 #. type: Plain text
1006 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1007 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1008 msgid ""
1009 "If I<key> is found, the operation returns zero and sets the I<next_key> "
1010 "pointer to the key of the next element. If I<key> is not found, the "
1011 "operation returns zero and sets the I<next_key> pointer to the key of the "
1012 "first element. If I<key> is the last element, -1 is returned and I<errno> "
1013 "is set to B<ENOENT>. Other possible I<errno> values are B<ENOMEM>, "
1014 "B<EFAULT>, B<EPERM>, and B<EINVAL>. This method can be used to iterate over "
1015 "all elements in the map."
1016 msgstr ""
1017 "إذا وُجد I<key>، تُعيد العملية صفراً وتضبط مؤشر I<next_key> على مفتاح العنصر "
1018 "التالي. إذا لم يُعثر على I<key>، تُعيد العملية صفراً وتضبط مؤشر I<next_key> على "
1019 "مفتاح العنصر الأول. إذا كان I<key> هو العنصر الأخير، يُعاد -1 ويُضبط I<errno> "
1020 "على B<ENOENT>. قيم I<errno> المحتملة الأخرى هي B<ENOMEM> و B<EFAULT> و "
1021 "B<EPERM> و B<EINVAL>. يمكن استخدام هذا الأسلوب للتكرار عبر جميع العناصر في "
1022 "الخريطة."
1023
1024 #. type: TP
1025 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1026 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1027 #, no-wrap
1028 msgid "B<close(map_fd)>"
1029 msgstr "B<close(map_fd)>"
1030
1031 #. type: Plain text
1032 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1033 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1034 msgid ""
1035 "Delete the map referred to by the file descriptor I<map_fd>. When the user-"
1036 "space program that created a map exits, all maps will be deleted "
1037 "automatically (but see NOTES)."
1038 msgstr ""
1039 "احذف الخريطة المشار إليها بواسطة واصف الملف I<map_fd>. عندما يخرج برنامج "
1040 "مساحة المستخدم الذي أنشأ الخريطة، ستُحذف جميع الخرائط آلياً (لكن انظر "
1041 "الملاحظات NOTES)."
1042
1043 #. type: SS
1044 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1045 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1046 #, no-wrap
1047 msgid "eBPF map types"
1048 msgstr "أنواع خرائط eBPF"
1049
1050 #. type: Plain text
1051 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1052 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1053 msgid "The following map types are supported:"
1054 msgstr "أنواع الخرائط التالية مدعومة:"
1055
1056 #. type: TP
1057 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1058 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1059 #, no-wrap
1060 msgid "B<BPF_MAP_TYPE_HASH>"
1061 msgstr "B<BPF_MAP_TYPE_HASH>"
1062
1063 #. commit 0f8e4bd8a1fc8c4185f1630061d0a1f2d197a475
1064 #. type: Plain text
1065 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1066 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1067 msgid "Hash-table maps have the following characteristics:"
1068 msgstr "تتميز خرائط جدول التجزئة (Hash-table) بالخصائص التالية:"
1069
1070 #. type: Plain text
1071 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1072 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1073 msgid ""
1074 "Maps are created and destroyed by user-space programs. Both user-space and "
1075 "eBPF programs can perform lookup, update, and delete operations."
1076 msgstr ""
1077 "تُنشأ الخرائط وتُدمر بواسطة برامج مساحة المستخدم. يمكن لكل من برامج مساحة "
1078 "المستخدم وبرامج eBPF إجراء عمليات البحث والتحديث والحذف."
1079
1080 #. type: Plain text
1081 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1082 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1083 msgid "The kernel takes care of allocating and freeing key/value pairs."
1084 msgstr "تتولى النواة مسؤولية تخصيص وتحرير أزواج المفتاح/القيمة."
1085
1086 #. type: Plain text
1087 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1088 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1089 msgid ""
1090 "The B<map_update_elem>() helper will fail to insert new element when the "
1091 "I<max_entries> limit is reached. (This ensures that eBPF programs cannot "
1092 "exhaust memory.)"
1093 msgstr ""
1094 "سيفشل المساعد B<map_update_elem>() في إدراج عنصر جديد عند الوصول إلى حد "
1095 "I<max_entries>. (يضمن هذا عدم استنفاد برامج eBPF للذاكرة.)"
1096
1097 #. type: Plain text
1098 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1099 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1100 msgid "B<map_update_elem>() replaces existing elements atomically."
1101 msgstr "يستبدل B<map_update_elem>() العناصر الموجودة بشكل ذري."
1102
1103 #. type: Plain text
1104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1106 msgid "Hash-table maps are optimized for speed of lookup."
1107 msgstr "خُصصت خرائط جدول التجزئة لتكون محسنة لسرعة البحث."
1108
1109 #. type: TP
1110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1112 #, no-wrap
1113 msgid "B<BPF_MAP_TYPE_ARRAY>"
1114 msgstr "B<BPF_MAP_TYPE_ARRAY>"
1115
1116 #. commit 28fbcfa08d8ed7c5a50d41a0433aad222835e8e3
1117 #. type: Plain text
1118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1120 msgid "Array maps have the following characteristics:"
1121 msgstr "تتميز خرائط المصفوفة (Array) بالخصائص التالية:"
1122
1123 #. type: Plain text
1124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1126 msgid ""
1127 "Optimized for fastest possible lookup. In the future the verifier/JIT "
1128 "compiler may recognize lookup() operations that employ a constant key and "
1129 "optimize it into constant pointer. It is possible to optimize a non-"
1130 "constant key into direct pointer arithmetic as well, since pointers and "
1131 "I<value_size> are constant for the life of the eBPF program. In other "
1132 "words, B<array_map_lookup_elem>() may be 'inlined' by the verifier/JIT "
1133 "compiler while preserving concurrent access to this map from user space."
1134 msgstr ""
1135 "خُصصت لتكون محسنة لأسرع بحث ممكن. في المستقبل، قد يتعرف المدقق أو مصرف JIT "
1136 "على عمليات lookup() التي تستخدم مفتاحاً ثابتاً ويحسنها إلى مؤشر ثابت. من "
1137 "الممكن أيضًا تحسين المفتاح غير الثابت إلى حسابات مؤشرات مباشرة، بما أن "
1138 "المؤشرات و I<value_size> ثابتة طوال عمر برنامج eBPF. بمعنى آخر، قد يُضمن "
1139 "B<array_map_lookup_elem>() داخلياً بواسطة المدقق أو مصرف JIT مع الحفاظ على "
1140 "الوصول المتزامن لهذه الخريطة من مساحة المستخدم."
1141
1142 #. type: Plain text
1143 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1144 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1145 msgid "All array elements pre-allocated and zero initialized at init time"
1146 msgstr "جميع عناصر المصفوفة مخصصة مسبقاً ومصفرة عند التهيئة."
1147
1148 #. type: Plain text
1149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1151 msgid "The key is an array index, and must be exactly four bytes."
1152 msgstr "المفتاح هو فهرس مصفوفة، ويجب أن يكون أربعة بايتات بالضبط."
1153
1154 #. type: Plain text
1155 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1156 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1157 msgid ""
1158 "B<map_delete_elem>() fails with the error B<EINVAL>, since elements cannot "
1159 "be deleted."
1160 msgstr "يفشل B<map_delete_elem>() بالخطأ B<EINVAL>، حيث لا يمكن حذف العناصر."
1161
1162 #. type: Plain text
1163 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1164 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1165 msgid ""
1166 "B<map_update_elem>() replaces elements in a B<nonatomic> fashion; for "
1167 "atomic updates, a hash-table map should be used instead. There is however "
1168 "one special case that can also be used with arrays: the atomic built-in "
1169 "B<__sync_fetch_and_add()> can be used on 32 and 64 bit atomic counters. For "
1170 "example, it can be applied on the whole value itself if it represents a "
1171 "single counter, or in case of a structure containing multiple counters, it "
1172 "could be used on individual counters. This is quite often useful for "
1173 "aggregation and accounting of events."
1174 msgstr ""
1175 "يستبدل B<map_update_elem>() العناصر بطريقة غير ذرية (nonatomic)؛ وللتحديثات "
1176 "الذرية، يجب استخدام خريطة جدول تجزئة بدلاً من ذلك. ومع ذلك، توجد حالة خاصة "
1177 "واحدة يمكن استخدامها أيضًا مع المصفوفات: يمكن استخدام البنية الذرية المدمجة "
1178 "B<__sync_fetch_and_add()> على العدادات الذرية ذات 32 و 64 بت. على سبيل "
1179 "المثال، يمكن تطبيقها على القيمة بأكملها إذا كانت تمثل عداداً واحداً، أو في "
1180 "حالة وجود بنية تحتوي على عدادات متعددة، يمكن استخدامها على عدادات فردية. "
1181 "وهذا مفيد غالباً لتجميع وحساب الأحداث."
1182
1183 #. type: Plain text
1184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1186 msgid "Among the uses for array maps are the following:"
1187 msgstr "من بين استخدامات خرائط المصفوفة ما يلي:"
1188
1189 #. type: Plain text
1190 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1191 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1192 msgid ""
1193 "As \"global\" eBPF variables: an array of 1 element whose key is (index) 0 "
1194 "and where the value is a collection of 'global' variables which eBPF "
1195 "programs can use to keep state between events."
1196 msgstr ""
1197 "كمتغيرات eBPF \"عالمية\": مصفوفة من عنصر واحد مفتاحها هو (الفهرس) 0 وتكون "
1198 "القيمة فيها عبارة عن مجموعة من المتغيرات 'العالمية' التي يمكن لبرامج eBPF "
1199 "استخدامها للحفاظ على الحالة بين الأحداث."
1200
1201 #. type: Plain text
1202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1204 msgid "Aggregation of tracing events into a fixed set of buckets."
1205 msgstr "تجميع أحداث التتبع في مجموعة ثابتة من السلال (buckets)."
1206
1207 #. type: Plain text
1208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1210 msgid ""
1211 "Accounting of networking events, for example, number of packets and packet "
1212 "sizes."
1213 msgstr "حساب أحداث الشبكة، مثل عدد الحزم وأحجام الحزم."
1214
1215 #. type: TP
1216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1218 #, no-wrap
1219 msgid "B<BPF_MAP_TYPE_PROG_ARRAY> (since Linux 4.2)"
1220 msgstr "B<BPF_MAP_TYPE_PROG_ARRAY> (منذ لينكس 4.2)"
1221
1222 #. type: Plain text
1223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1225 msgid ""
1226 "A program array map is a special kind of array map whose map values contain "
1227 "only file descriptors referring to other eBPF programs. Thus, both the "
1228 "I<key_size> and I<value_size> must be exactly four bytes. This map is used "
1229 "in conjunction with the B<bpf_tail_call>() helper."
1230 msgstr ""
1231 "خريطة مصفوفة البرامج هي نوع خاص من خرائط المصفوفة التي تحتوي قيمها فقط على "
1232 "واصفات ملفات تشير إلى برامج eBPF أخرى. وبالتالي، يجب أن يكون كل من "
1233 "I<key_size> و I<value_size> أربعة بايتات بالضبط. تُستخدم هذه الخريطة "
1234 "بالاقتران مع المساعد B<bpf_tail_call>()."
1235
1236 #. type: Plain text
1237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1239 msgid ""
1240 "This means that an eBPF program with a program array map attached to it can "
1241 "call from kernel side into"
1242 msgstr ""
1243 "هذا يعني أن برنامج eBPF الذي أُرفقت به خريطة مصفوفة برامج يمكنه الاستدعاء من "
1244 "جانب النواة إلى"
1245
1246 #. type: Plain text
1247 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1248 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1249 #, no-wrap
1250 msgid ""
1251 "void bpf_tail_call(void *context, void *prog_map,\n"
1252 " unsigned int index);\n"
1253 msgstr ""
1254 "void bpf_tail_call(void *context, void *prog_map,\n"
1255 " unsigned int index);\n"
1256
1257 #. type: Plain text
1258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1260 msgid ""
1261 "and therefore replace its own program flow with the one from the program at "
1262 "the given program array slot, if present. This can be regarded as kind of a "
1263 "jump table to a different eBPF program. The invoked program will then reuse "
1264 "the same stack. When a jump into the new program has been performed, it "
1265 "won't return to the old program anymore."
1266 msgstr ""
1267 "وبالتالي يستبدل تدفق البرنامج الخاص به بالتدفق الموجود في البرنامج عند فتحة "
1268 "مصفوفة البرامج المعطاة، إن وجد. يمكن اعتبار ذلك نوعاً من جدول القفز إلى "
1269 "برنامج eBPF مختلف. سيعيد البرنامج المُستدعى استخدام نفس المكدس. عند تنفيذ "
1270 "القفزة إلى البرنامج الجديد، لن يعود إلى البرنامج القديم مرة أخرى."
1271
1272 #. MAX_TAIL_CALL_CNT
1273 #. type: Plain text
1274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1276 msgid ""
1277 "If no eBPF program is found at the given index of the program array (because "
1278 "the map slot doesn't contain a valid program file descriptor, the specified "
1279 "lookup index/key is out of bounds, or the limit of 32 nested calls has been "
1280 "exceed), execution continues with the current eBPF program. This can be "
1281 "used as a fall-through for default cases."
1282 msgstr ""
1283 "إذا لم يُعثر على برنامج eBPF عند الفهرس المعطى لمصفوفة البرامج (بسبب عدم "
1284 "احتواء فتحة الخريطة على واصف ملف برنامج صالح، أو لأن فهرس/مفتاح البحث المحدد "
1285 "خارج النطاق، أو تجاوز حد 32 استدعاءً متداخلاً)، يستمر التنفيذ مع برنامج eBPF "
1286 "الحالي. يمكن استخدام ذلك كمسار احتياطي للحالات المبدئية."
1287
1288 #. type: Plain text
1289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1291 msgid ""
1292 "A program array map is useful, for example, in tracing or networking, to "
1293 "handle individual system calls or protocols in their own subprograms and use "
1294 "their identifiers as an individual map index. This approach may result in "
1295 "performance benefits, and also makes it possible to overcome the maximum "
1296 "instruction limit of a single eBPF program. In dynamic environments, a user-"
1297 "space daemon might atomically replace individual subprograms at run-time "
1298 "with newer versions to alter overall program behavior, for instance, if "
1299 "global policies change."
1300 msgstr ""
1301 "تعد خريطة مصفوفة البرامج مفيدة، على سبيل المثال، في التتبع أو الشبكات، "
1302 "للتعامل مع استدعاءات النظام أو البروتوكولات الفردية في برامجها الفرعية "
1303 "الخاصة واستخدام معرفاتها كفهرس خريطة فردي. قد يؤدي هذا النهج إلى فوائد في "
1304 "الأداء، كما يجعل من الممكن التغلب على الحد الأقصى للتعليمات لبرنامج eBPF "
1305 "واحد. في البيئات الديناميكية، قد يستبدل عفريت (daemon) مساحة المستخدم بشكل "
1306 "ذري البرامج الفرعية الفردية في وقت التشغيل بإصدارات أحدث لتغيير سلوك "
1307 "البرنامج العام، على سبيل المثال، إذا تغيرت السياسات العالمية."
1308
1309 #. type: SS
1310 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1311 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1312 #, no-wrap
1313 msgid "eBPF programs"
1314 msgstr "برامج eBPF"
1315
1316 #. type: Plain text
1317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1319 msgid ""
1320 "The B<BPF_PROG_LOAD> command is used to load an eBPF program into the "
1321 "kernel. The return value for this command is a new file descriptor "
1322 "associated with this eBPF program."
1323 msgstr ""
1324 "يُستخدم الأمر B<BPF_PROG_LOAD> لتحميل برنامج eBPF في النواة. القيمة المعادة "
1325 "لهذا الأمر هي واصف ملف جديد مرتبط ببرنامج eBPF هذا."
1326
1327 #. type: Plain text
1328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1330 #, no-wrap
1331 msgid ""
1332 "char bpf_log_buf[LOG_BUF_SIZE];\n"
1333 "\\&\n"
1334 "int\n"
1335 "bpf_prog_load(enum bpf_prog_type type,\n"
1336 " const struct bpf_insn *insns, int insn_cnt,\n"
1337 " const char *license)\n"
1338 "{\n"
1339 " union bpf_attr attr = {\n"
1340 " .prog_type = type,\n"
1341 " .insns = ptr_to_u64(insns),\n"
1342 " .insn_cnt = insn_cnt,\n"
1343 " .license = ptr_to_u64(license),\n"
1344 " .log_buf = ptr_to_u64(bpf_log_buf),\n"
1345 " .log_size = LOG_BUF_SIZE,\n"
1346 " .log_level = 1,\n"
1347 " };\n"
1348 "\\&\n"
1349 " return bpf(BPF_PROG_LOAD, &attr, sizeof(attr));\n"
1350 "}\n"
1351 msgstr ""
1352 "char bpf_log_buf[LOG_BUF_SIZE];\n"
1353 "\\&\n"
1354 "int\n"
1355 "bpf_prog_load(enum bpf_prog_type type,\n"
1356 " const struct bpf_insn *insns, int insn_cnt,\n"
1357 " const char *license)\n"
1358 "{\n"
1359 " union bpf_attr attr = {\n"
1360 " .prog_type = type,\n"
1361 " .insns = ptr_to_u64(insns),\n"
1362 " .insn_cnt = insn_cnt,\n"
1363 " .license = ptr_to_u64(license),\n"
1364 " .log_buf = ptr_to_u64(bpf_log_buf),\n"
1365 " .log_size = LOG_BUF_SIZE,\n"
1366 " .log_level = 1,\n"
1367 " };\n"
1368 "\\&\n"
1369 " return bpf(BPF_PROG_LOAD, &attr, sizeof(attr));\n"
1370 "}\n"
1371
1372 #. type: Plain text
1373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1375 msgid "I<prog_type> is one of the available program types:"
1376 msgstr "يكون I<prog_type> واحداً من أنواع البرامج المتاحة:"
1377
1378 #. type: Plain text
1379 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1380 #: opensuse-tumbleweed
1381 #, no-wrap
1382 msgid ""
1383 "enum bpf_prog_type {\n"
1384 " BPF_PROG_TYPE_UNSPEC, /* Reserve 0 as invalid\n"
1385 " program type */\n"
1386 " BPF_PROG_TYPE_SOCKET_FILTER,\n"
1387 " BPF_PROG_TYPE_KPROBE,\n"
1388 " BPF_PROG_TYPE_SCHED_CLS,\n"
1389 " BPF_PROG_TYPE_SCHED_ACT,\n"
1390 " BPF_PROG_TYPE_TRACEPOINT,\n"
1391 " BPF_PROG_TYPE_XDP,\n"
1392 " BPF_PROG_TYPE_PERF_EVENT,\n"
1393 " BPF_PROG_TYPE_CGROUP_SKB,\n"
1394 " BPF_PROG_TYPE_CGROUP_SOCK,\n"
1395 " BPF_PROG_TYPE_LWT_IN,\n"
1396 " BPF_PROG_TYPE_LWT_OUT,\n"
1397 " BPF_PROG_TYPE_LWT_XMIT,\n"
1398 " BPF_PROG_TYPE_SOCK_OPS,\n"
1399 " BPF_PROG_TYPE_SK_SKB,\n"
1400 " BPF_PROG_TYPE_CGROUP_DEVICE,\n"
1401 " BPF_PROG_TYPE_SK_MSG,\n"
1402 " BPF_PROG_TYPE_RAW_TRACEPOINT,\n"
1403 " BPF_PROG_TYPE_CGROUP_SOCK_ADDR,\n"
1404 " BPF_PROG_TYPE_LWT_SEG6LOCAL,\n"
1405 " BPF_PROG_TYPE_LIRC_MODE2,\n"
1406 " BPF_PROG_TYPE_SK_REUSEPORT,\n"
1407 " BPF_PROG_TYPE_FLOW_DISSECTOR,\n"
1408 " /* See /usr/include/linux/bpf.h for the full list. */\n"
1409 "};\n"
1410 msgstr ""
1411 "enum bpf_prog_type {\n"
1412 " BPF_PROG_TYPE_UNSPEC, /* حجز 0 كنوع برنامج\n"
1413 " غير صالح */\n"
1414 " BPF_PROG_TYPE_SOCKET_FILTER,\n"
1415 " BPF_PROG_TYPE_KPROBE,\n"
1416 " BPF_PROG_TYPE_SCHED_CLS,\n"
1417 " BPF_PROG_TYPE_SCHED_ACT,\n"
1418 " BPF_PROG_TYPE_TRACEPOINT,\n"
1419 " BPF_PROG_TYPE_XDP,\n"
1420 " BPF_PROG_TYPE_PERF_EVENT,\n"
1421 " BPF_PROG_TYPE_CGROUP_SKB,\n"
1422 " BPF_PROG_TYPE_CGROUP_SOCK,\n"
1423 " BPF_PROG_TYPE_LWT_IN,\n"
1424 " BPF_PROG_TYPE_LWT_OUT,\n"
1425 " BPF_PROG_TYPE_LWT_XMIT,\n"
1426 " BPF_PROG_TYPE_SOCK_OPS,\n"
1427 " BPF_PROG_TYPE_SK_SKB,\n"
1428 " BPF_PROG_TYPE_CGROUP_DEVICE,\n"
1429 " BPF_PROG_TYPE_SK_MSG,\n"
1430 " BPF_PROG_TYPE_RAW_TRACEPOINT,\n"
1431 " BPF_PROG_TYPE_CGROUP_SOCK_ADDR,\n"
1432 " BPF_PROG_TYPE_LWT_SEG6LOCAL,\n"
1433 " BPF_PROG_TYPE_LIRC_MODE2,\n"
1434 " BPF_PROG_TYPE_SK_REUSEPORT,\n"
1435 " BPF_PROG_TYPE_FLOW_DISSECTOR,\n"
1436 " /* انظر /usr/include/linux/bpf.h للقائمة الكاملة. */\n"
1437 "};\n"
1438
1439 #. type: Plain text
1440 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1441 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1442 msgid "For further details of eBPF program types, see below."
1443 msgstr "لمزيد من التفاصيل حول أنواع برامج eBPF، انظر أدناه."
1444
1445 #. type: Plain text
1446 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1447 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1448 msgid "The remaining fields of I<bpf_attr> are set as follows:"
1449 msgstr "تُضبط الحقول المتبقية من I<bpf_attr> على النحو التالي:"
1450
1451 #. type: Plain text
1452 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1453 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1454 msgid "I<insns> is an array of I<struct bpf_insn> instructions."
1455 msgstr "I<insns> عبارة عن مصفوفة من تعليمات I<struct bpf_insn>."
1456
1457 #. type: Plain text
1458 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1459 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1460 msgid ""
1461 "I<insn_cnt> is the number of instructions in the program referred to by "
1462 "I<insns>."
1463 msgstr "I<insn_cnt> هو عدد التعليمات في البرنامج المشار إليه بواسطة I<insns>."
1464
1465 #. type: Plain text
1466 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1467 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1468 msgid ""
1469 "I<license> is a license string, which must be GPL compatible to call helper "
1470 "functions marked I<gpl_only>. (The licensing rules are the same as for "
1471 "kernel modules, so that also dual licenses, such as \"Dual BSD/GPL\", may be "
1472 "used.)"
1473 msgstr ""
1474 "I<license> هي سلسلة الترخيص، والتي يجب أن تكون متوافقة مع GPL لاستدعاء "
1475 "الدوال المساعدة المميزة بـ I<gpl_only>. (قواعد الترخيص هي نفسها المتبعة في "
1476 "وحدات النواة، لذا يمكن أيضًا استخدام التراخيص المزدوجة، مثل \"Dual BSD/GPL\".)"
1477
1478 #. type: Plain text
1479 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1480 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1481 msgid ""
1482 "I<log_buf> is a pointer to a caller-allocated buffer in which the in-kernel "
1483 "verifier can store the verification log. This log is a multi-line string "
1484 "that can be checked by the program author in order to understand how the "
1485 "verifier came to the conclusion that the eBPF program is unsafe. The format "
1486 "of the output can change at any time as the verifier evolves."
1487 msgstr ""
1488 "I<log_buf> هو مؤشر إلى مخزن مؤقت خصصه المستدعِي (caller) حيث يمكن لمدقق داخل "
1489 "النواة تخزين سجل التحقق فيه. هذا السجل عبارة عن سلسلة متعددة الأسطر يمكن "
1490 "لمؤلف البرنامج فحصها لفهم كيف توصل المدقق إلى استنتاج مفاده أن برنامج eBPF "
1491 "غير آمن. قد يتغير تنسيق المخرجات في أي وقت مع تطور المدقق."
1492
1493 #. type: Plain text
1494 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1495 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1496 msgid ""
1497 "I<log_size> size of the buffer pointed to by I<log_buf>. If the size of the "
1498 "buffer is not large enough to store all verifier messages, -1 is returned "
1499 "and I<errno> is set to B<ENOSPC>."
1500 msgstr ""
1501 "I<log_size> هو حجم المخزن المؤقت الذي يشير إليه I<log_buf>. إذا لم يكن حجم "
1502 "المخزن المؤقت كبيراً بما يكفي لتخزين جميع رسائل المدقق، يُعاد -1 ويُضبط "
1503 "I<errno> على B<ENOSPC>."
1504
1505 #. type: Plain text
1506 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1507 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1508 msgid ""
1509 "I<log_level> verbosity level of the verifier. A value of zero means that "
1510 "the verifier will not provide a log; in this case, I<log_buf> must be a null "
1511 "pointer, and I<log_size> must be zero."
1512 msgstr ""
1513 "I<log_level> هو مستوى إسهاب المدقق. تعني القيمة صفر أن المدقق لن يقدم سجلاً؛ "
1514 "في هذه الحالة، يجب أن يكون I<log_buf> مؤشراً فارغاً (null)، ويجب أن يكون "
1515 "I<log_size> صفراً."
1516
1517 #. type: Plain text
1518 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1519 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1520 msgid ""
1521 "Applying B<close>(2) to the file descriptor returned by B<BPF_PROG_LOAD> "
1522 "will unload the eBPF program (but see NOTES)."
1523 msgstr ""
1524 "يؤدي تطبيق B<close>(2) على واصف الملف المعاد بواسطة B<BPF_PROG_LOAD> إلى "
1525 "إلغاء تحميل برنامج eBPF (ولكن انظر الملاحظات NOTES)."
1526
1527 #. type: Plain text
1528 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1529 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1530 msgid ""
1531 "Maps are accessible from eBPF programs and are used to exchange data between "
1532 "eBPF programs and between eBPF programs and user-space programs. For "
1533 "example, eBPF programs can process various events (like kprobe, packets) and "
1534 "store their data into a map, and user-space programs can then fetch data "
1535 "from the map. Conversely, user-space programs can use a map as a "
1536 "configuration mechanism, populating the map with values checked by the eBPF "
1537 "program, which then modifies its behavior on the fly according to those "
1538 "values."
1539 msgstr ""
1540 "يمكن الوصول إلى الخرائط من برامج eBPF وتُستخدم لتبادل البيانات بين برامج eBPF "
1541 "وبين برامج eBPF وبرامج مساحة المستخدم. على سبيل المثال، يمكن لبرامج eBPF "
1542 "معالجة أحداث مختلفة (مثل kprobe والحزم) وتخزين بياناتها في خريطة، ومن ثم "
1543 "يمكن لبرامج مساحة المستخدم جلب البيانات من الخريطة. وعلى العكس، يمكن لبرامج "
1544 "مساحة المستخدم استخدام الخريطة كآلية ضبط، فتملأ الخريطة بالقيم التي يفحصها "
1545 "برنامج eBPF، والذي يعدل سلوكه بعد ذلك أثناء التشغيل وفقاً لتلك القيم."
1546
1547 #. type: SS
1548 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1549 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1550 #, no-wrap
1551 msgid "eBPF program types"
1552 msgstr "أنواع برامج eBPF"
1553
1554 #
1555 #. #-#-#-#-# archlinux: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
1556 #. FIXME
1557 #. Somewhere in this page we need a general introduction to the
1558 #. bpf_context. For example, how does a BPF program access the
1559 #. context?
1560 #. type: Plain text
1561 #. #-#-#-#-# debian-trixie: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
1562 #. FIXME
1563 #. Somewhere in this page we need a general introduction to the
1564 #. bpf_context. For example, how does a BPF program access the
1565 #. context?
1566 #. type: Plain text
1567 #. #-#-#-#-# debian-unstable: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
1568 #. FIXME
1569 #. Somewhere in this page we need a general introduction to the
1570 #. bpf_context. For example, how does a BPF program access the
1571 #. context?
1572 #. type: Plain text
1573 #. #-#-#-#-# fedora-44: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
1574 #. FIXME
1575 #. Somewhere in this page we need a general introduction to the
1576 #. bpf_context. For example, how does a BPF program access the
1577 #. context?
1578 #. type: Plain text
1579 #. #-#-#-#-# fedora-rawhide: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
1580 #. FIXME
1581 #. Somewhere in this page we need a general introduction to the
1582 #. bpf_context. For example, how does a BPF program access the
1583 #. context?
1584 #. type: Plain text
1585 #. #-#-#-#-# mageia-cauldron: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
1586 #. FIXME
1587 #. Somewhere in this page we need a general introduction to the
1588 #. bpf_context. For example, how does a BPF program access the
1589 #. context?
1590 #. type: Plain text
1591 #. #-#-#-#-# opensuse-leap-16-1: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
1592 #. FIXME
1593 #. Somewhere in this page we need a general introduction to the
1594 #. bpf_context. For example, how does a BPF program access the
1595 #. context?
1596 #. type: Plain text
1597 #. #-#-#-#-# opensuse-tumbleweed: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
1598 #. FIXME
1599 #. Somewhere in this page we need a general introduction to the
1600 #. bpf_context. For example, how does a BPF program access the
1601 #. context?
1602 #. type: Plain text
1603 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1604 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1605 msgid ""
1606 "The eBPF program type (I<prog_type>) determines the subset of kernel helper "
1607 "functions that the program may call. The program type also determines the "
1608 "program input (context)\\[em]the format of I<struct bpf_context> (which is "
1609 "the data blob passed into the eBPF program as the first argument)."
1610 msgstr ""
1611 "يحدد نوع برنامج eBPF (I<prog_type>) المجموعة الفرعية من الدوال المساعدة "
1612 "للنواة التي قد يستدعيها البرنامج. كما يحدد نوع البرنامج مدخلات البرنامج "
1613 "(السياق) — تنسيق I<struct bpf_context> (وهو كتلة البيانات الممررة إلى برنامج "
1614 "eBPF كمعامل أول)."
1615
1616 #. type: Plain text
1617 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1618 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1619 msgid ""
1620 "For example, a tracing program does not have the exact same subset of helper "
1621 "functions as a socket filter program (though they may have some helpers in "
1622 "common). Similarly, the input (context) for a tracing program is a set of "
1623 "register values, while for a socket filter it is a network packet."
1624 msgstr ""
1625 "على سبيل المثال، لا يمتلك برنامج التتبع نفس المجموعة الفرعية من الدوال "
1626 "المساعدة التي يمتلكها برنامج مرشح المقبس (على الرغم من أنه قد يكون بينهما "
1627 "بعض المساعدات المشتركة). وبالمثل، فإن المدخلات (السياق) لبرنامج التتبع هي "
1628 "مجموعة من قيم المسجلات، بينما لمرشح المقبس هي حزمة شبكة."
1629
1630 #. type: Plain text
1631 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1632 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1633 msgid ""
1634 "The set of functions available to eBPF programs of a given type may increase "
1635 "in the future."
1636 msgstr "قد تزداد مجموعة الدوال المتاحة لبرامج eBPF من نوع معين في المستقبل."
1637
1638 #. type: Plain text
1639 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1640 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1641 msgid "The following program types are supported:"
1642 msgstr "أنواع البرامج التالية مدعومة:"
1643
1644 #. type: TP
1645 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1646 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1647 #, no-wrap
1648 msgid "B<BPF_PROG_TYPE_SOCKET_FILTER> (since Linux 3.19)"
1649 msgstr "B<BPF_PROG_TYPE_SOCKET_FILTER> (منذ لينكس 3.19)"
1650
1651 #. type: Plain text
1652 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1653 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1654 msgid "Currently, the set of functions for B<BPF_PROG_TYPE_SOCKET_FILTER> is:"
1655 msgstr "حالياً، مجموعة الدوال لـ B<BPF_PROG_TYPE_SOCKET_FILTER> هي:"
1656
1657 #. type: Plain text
1658 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1659 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1660 #, no-wrap
1661 msgid ""
1662 "bpf_map_lookup_elem(map_fd, void *key)\n"
1663 " /* look up key in a map_fd */\n"
1664 "bpf_map_update_elem(map_fd, void *key, void *value)\n"
1665 " /* update key/value */\n"
1666 "bpf_map_delete_elem(map_fd, void *key)\n"
1667 " /* delete key in a map_fd */\n"
1668 msgstr ""
1669 "bpf_map_lookup_elem(map_fd, void *key)\n"
1670 " /* ابحث عن مفتاح في map_fd */\n"
1671 "bpf_map_update_elem(map_fd, void *key, void *value)\n"
1672 " /* حدّث المفتاح/القيمة */\n"
1673 "bpf_map_delete_elem(map_fd, void *key)\n"
1674 " /* احذف مفتاحاً في map_fd */\n"
1675
1676 #
1677 #. FIXME: We need some text here to explain how the program
1678 #. accesses __sk_buff.
1679 #. See 'struct __sk_buff' and commit 9bac3d6d548e5
1680 #. Alexei commented:
1681 #. Actually now in case of SOCKET_FILTER, SCHED_CLS, SCHED_ACT
1682 #. the program can now access skb fields.
1683 #. type: Plain text
1684 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1685 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1686 msgid "The I<bpf_context> argument is a pointer to a I<struct __sk_buff>."
1687 msgstr "المعامل I<bpf_context> هو مؤشر إلى I<struct __sk_buff>."
1688
1689 #. type: TP
1690 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1691 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1692 #, no-wrap
1693 msgid "B<BPF_PROG_TYPE_KPROBE> (since Linux 4.1)"
1694 msgstr "B<BPF_PROG_TYPE_KPROBE> (منذ لينكس 4.1)"
1695
1696 #. commit 94caee8c312d96522bcdae88791aaa9ebcd5f22c
1697 #. commit a8cb5f556b567974d75ea29c15181c445c541b1f
1698 #. FIXME Document this program type
1699 #. Describe allowed helper functions for this program type
1700 #. Describe bpf_context for this program type
1701 #. type: Plain text
1702 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1703 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1704 msgid "[To be documented]"
1705 msgstr "[سيُوثّق]"
1706
1707 #. type: TP
1708 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1709 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1710 #, no-wrap
1711 msgid "B<BPF_PROG_TYPE_SCHED_CLS> (since Linux 4.1)"
1712 msgstr "B<BPF_PROG_TYPE_SCHED_CLS> (منذ لينكس 4.1)"
1713
1714 #. type: TP
1715 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1716 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1717 #, no-wrap
1718 msgid "B<BPF_PROG_TYPE_SCHED_ACT> (since Linux 4.1)"
1719 msgstr "B<BPF_PROG_TYPE_SCHED_ACT> (منذ لينكس 4.1)"
1720
1721 #. type: SS
1722 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1723 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1724 #, no-wrap
1725 msgid "Events"
1726 msgstr "أحداث"
1727
1728 #. type: Plain text
1729 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1730 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1731 msgid ""
1732 "Once a program is loaded, it can be attached to an event. Various kernel "
1733 "subsystems have different ways to do so."
1734 msgstr ""
1735 "بمجرد تحميل البرنامج، يمكن إرفاقه بحدث ما. تتبع الأنظمة الفرعية المختلفة "
1736 "للنواة طرقاً متباينة للقيام بذلك."
1737
1738 #. commit 89aa075832b0da4402acebd698d0411dcc82d03e
1739 #. type: Plain text
1740 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1741 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1742 msgid ""
1743 "Since Linux 3.19, the following call will attach the program I<prog_fd> to "
1744 "the socket I<sockfd>, which was created by an earlier call to B<socket>(2):"
1745 msgstr ""
1746 "بدءًا من لينكس 3.19، سيقوم الاستدعاء التالي بربط البرنامج I<prog_fd> بالمقبس "
1747 "I<sockfd>، الذي أُنشئ عبر استدعاء سابق لـ B<socket>(2):"
1748
1749 #. type: Plain text
1750 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1751 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1752 #, no-wrap
1753 msgid ""
1754 "setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_BPF,\n"
1755 " &prog_fd, sizeof(prog_fd));\n"
1756 msgstr ""
1757 "setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_BPF,\n"
1758 " &prog_fd, sizeof(prog_fd));\n"
1759
1760 #. commit 2541517c32be2531e0da59dfd7efc1ce844644f5
1761 #. type: Plain text
1762 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1763 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1764 msgid ""
1765 "Since Linux 4.1, the following call may be used to attach the eBPF program "
1766 "referred to by the file descriptor I<prog_fd> to a perf event file "
1767 "descriptor, I<event_fd>, that was created by a previous call to "
1768 "B<perf_event_open>(2):"
1769 msgstr ""
1770 "بدءًا من لينكس 4.1، يمكن استخدام الاستدعاء التالي لربط برنامج eBPF المشار "
1771 "إليه بواسطة واصف الملف I<prog_fd> بواصف ملف حدث perf، I<event_fd>، الذي أُنشئ "
1772 "عبر استدعاء سابق لـ B<perf_event_open>(2):"
1773
1774 #. type: Plain text
1775 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1776 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1777 #, no-wrap
1778 msgid "ioctl(event_fd, PERF_EVENT_IOC_SET_BPF, prog_fd);\n"
1779 msgstr "ioctl(event_fd, PERF_EVENT_IOC_SET_BPF, prog_fd);\n"
1780
1781 #. type: SH
1782 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1783 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1784 #, no-wrap
1785 msgid "RETURN VALUE"
1786 msgstr "قيمة الإرجاع"
1787
1788 #. type: Plain text
1789 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1790 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1791 msgid "For a successful call, the return value depends on the operation:"
1792 msgstr "في حالة الاستدعاء الناجح، تعتمد قيمة الإرجاع على العملية:"
1793
1794 #. type: Plain text
1795 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1796 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1797 msgid "The new file descriptor associated with the eBPF map."
1798 msgstr "واصف الملف الجديد المرتبط بخريطة eBPF."
1799
1800 #. type: Plain text
1801 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1802 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1803 msgid "The new file descriptor associated with the eBPF program."
1804 msgstr "واصف الملف الجديد المرتبط ببرنامج eBPF."
1805
1806 #. type: TP
1807 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1808 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1809 #, no-wrap
1810 msgid "All other commands"
1811 msgstr "كل الأوامر الأخرى"
1812
1813 #. type: Plain text
1814 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1815 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1816 msgid "Zero."
1817 msgstr "صفر."
1818
1819 #. type: Plain text
1820 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1821 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1822 msgid "On error, -1 is returned, and I<errno> is set to indicate the error."
1823 msgstr "عند الخطأ، تُعاد القيمة -1، ويُضبط I<errno> للإشارة إلى الخطأ."
1824
1825 #. type: SH
1826 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1827 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1828 #, no-wrap
1829 msgid "ERRORS"
1830 msgstr "الأخطاء"
1831
1832 #. type: TP
1833 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1834 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1835 #, no-wrap
1836 msgid "B<E2BIG>"
1837 msgstr "B<E2BIG>"
1838
1839 #. type: Plain text
1840 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1841 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1842 msgid ""
1843 "The eBPF program is too large or a map reached the I<max_entries> limit "
1844 "(maximum number of elements)."
1845 msgstr ""
1846 "برنامج eBPF كبير جدًا أو وصلت الخريطة إلى حد I<max_entries> (العدد الأقصى "
1847 "للعناصر)."
1848
1849 #. type: TP
1850 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1851 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1852 #, no-wrap
1853 msgid "B<EACCES>"
1854 msgstr "B<EACCES>"
1855
1856 #. type: Plain text
1857 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1858 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1859 msgid ""
1860 "For B<BPF_PROG_LOAD>, even though all program instructions are valid, the "
1861 "program has been rejected because it was deemed unsafe. This may be because "
1862 "it may have accessed a disallowed memory region or an uninitialized stack/"
1863 "register or because the function constraints don't match the actual types or "
1864 "because there was a misaligned memory access. In this case, it is "
1865 "recommended to call B<bpf>() again with I<log_level = 1> and examine "
1866 "I<log_buf> for the specific reason provided by the verifier."
1867 msgstr ""
1868 "بالنسبة لـ B<BPF_PROG_LOAD>، وعلى الرغم من أن جميع تعليمات البرنامج صالحة، "
1869 "إلا أنه رُفض لأنه اعتبر غير آمن. قد يكون ذلك بسبب وصوله إلى منطقة ذاكرة غير "
1870 "مسموح بها أو مكدس/سجل غير مهيأ، أو لأن قيود الدالة لا تطابق الأنواع الفعلية، "
1871 "أو بسبب وجود وصول غير محاذٍ للذاكرة. في هذه الحالة، يُنصح باستدعاء B<bpf>() "
1872 "مجددًا مع ضبط I<log_level = 1> وفحص I<log_buf> لمعرفة السبب المحدد الذي قدمه "
1873 "المدقق."
1874
1875 #. type: TP
1876 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1877 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1878 #, no-wrap
1879 msgid "B<EAGAIN>"
1880 msgstr "B<EAGAIN>"
1881
1882 #. type: Plain text
1883 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1884 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1885 msgid ""
1886 "For B<BPF_PROG_LOAD>, indicates that needed resources are blocked. This "
1887 "happens when the verifier detects pending signals while it is checking the "
1888 "validity of the bpf program. In this case, just call B<bpf>() again with "
1889 "the same parameters."
1890 msgstr ""
1891 "بالنسبة لـ B<BPF_PROG_LOAD>، يشير هذا إلى أن الموارد المطلوبة محجوبة. يحدث "
1892 "هذا عندما يكتشف المدقق إشارات معلقة أثناء فحصه لصلاحية برنامج bpf. في هذه "
1893 "الحالة، ما عليك سوى استدعاء B<bpf>() مجددًا بنفس المعاملات."
1894
1895 #. type: TP
1896 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1897 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1898 #, no-wrap
1899 msgid "B<EBADF>"
1900 msgstr "B<EBADF>"
1901
1902 #. type: Plain text
1903 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1904 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1905 msgid "I<fd> is not an open file descriptor."
1906 msgstr "I<fd> ليس واصف ملف مفتوح."
1907
1908 #. type: TP
1909 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1910 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1911 #, no-wrap
1912 msgid "B<EFAULT>"
1913 msgstr "B<EFAULT>"
1914
1915 #. type: Plain text
1916 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1917 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1918 msgid ""
1919 "One of the pointers (I<key> or I<value> or I<log_buf> or I<insns>) is "
1920 "outside the accessible address space."
1921 msgstr ""
1922 "أحد المؤشرات (I<key> أو I<value> أو I<log_buf> أو I<insns>) يقع خارج مساحة "
1923 "العناوين التي يمكن الوصول إليها."
1924
1925 #. type: TP
1926 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1927 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1928 #, no-wrap
1929 msgid "B<EINVAL>"
1930 msgstr "B<EINVAL>"
1931
1932 #. type: Plain text
1933 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1934 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1935 msgid "The value specified in I<cmd> is not recognized by this kernel."
1936 msgstr "القيمة المحددة في I<cmd> غير معروفة لهذه النواة."
1937
1938 #. type: Plain text
1939 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1940 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1941 msgid "For B<BPF_MAP_CREATE>, either I<map_type> or attributes are invalid."
1942 msgstr "بالنسبة لـ B<BPF_MAP_CREATE>، إما I<map_type> أو السمات غير صالحة."
1943
1944 #. type: Plain text
1945 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1946 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1947 msgid ""
1948 "For B<BPF_MAP_*_ELEM> commands, some of the fields of I<union bpf_attr> that "
1949 "are not used by this command are not set to zero."
1950 msgstr ""
1951 "بالنسبة لأوامر B<BPF_MAP_*_ELEM>، بعض حقول I<union bpf_attr> التي لا "
1952 "يستخدمها هذا الأمر لم تُضبط على صفر."
1953
1954 #. type: Plain text
1955 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1956 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1957 msgid ""
1958 "For B<BPF_PROG_LOAD>, indicates an attempt to load an invalid program. eBPF "
1959 "programs can be deemed invalid due to unrecognized instructions, the use of "
1960 "reserved fields, jumps out of range, infinite loops or calls of unknown "
1961 "functions."
1962 msgstr ""
1963 "بالنسبة لـ B<BPF_PROG_LOAD>، يشير إلى محاولة تحميل برنامج غير صالح. يمكن "
1964 "اعتبار برامج eBPF غير صالحة بسبب تعليمات غير معروفة، أو استخدام حقول محجوزة، "
1965 "أو قفزات خارج النطاق، أو حلقات لانهائية، أو استدعاء دوال مجهولة."
1966
1967 #. type: TP
1968 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1969 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1970 #, no-wrap
1971 msgid "B<ENOENT>"
1972 msgstr "B<ENOENT>"
1973
1974 #. type: Plain text
1975 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1976 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1977 msgid ""
1978 "For B<BPF_MAP_LOOKUP_ELEM> or B<BPF_MAP_DELETE_ELEM>, indicates that the "
1979 "element with the given I<key> was not found."
1980 msgstr ""
1981 "بالنسبة لأوامر B<BPF_MAP_LOOKUP_ELEM> أو B<BPF_MAP_DELETE_ELEM>، يشير إلى أن "
1982 "العنصر ذا المفتاح I<key> المعطى لم يُعثر عليه."
1983
1984 #. type: TP
1985 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1986 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1987 #, no-wrap
1988 msgid "B<ENOMEM>"
1989 msgstr "B<ENOMEM>"
1990
1991 #. type: Plain text
1992 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1993 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1994 msgid "Cannot allocate sufficient memory."
1995 msgstr "تعذر تخصيص ذاكرة كافية."
1996
1997 #. type: TP
1998 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1999 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2000 #, no-wrap
2001 msgid "B<EPERM>"
2002 msgstr "B<EPERM>"
2003
2004 #. type: Plain text
2005 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2006 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2007 msgid ""
2008 "The call was made without sufficient privilege (without the B<CAP_SYS_ADMIN> "
2009 "capability)."
2010 msgstr "أُجري الاستدعاء دون امتياز كافٍ (بدون قدرة B<CAP_SYS_ADMIN>)."
2011
2012 #. type: SH
2013 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2014 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2015 #, no-wrap
2016 msgid "STANDARDS"
2017 msgstr "المعايير"
2018
2019 #. type: Plain text
2020 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2021 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2022 msgid "Linux."
2023 msgstr "لينكس."
2024
2025 #. type: SH
2026 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2027 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2028 #, no-wrap
2029 msgid "HISTORY"
2030 msgstr "التاريخ"
2031
2032 #. type: Plain text
2033 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2034 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2035 msgid "Linux 3.18."
2036 msgstr "لينكس 3.18."
2037
2038 #. type: SH
2039 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2040 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2041 #, no-wrap
2042 msgid "NOTES"
2043 msgstr "ملاحظات"
2044
2045 #. commit 1be7f75d1668d6296b80bf35dcf6762393530afc
2046 #. [Linux 5.6] mtk: The list of available functions is, I think, governed
2047 #. by the check in net/core/filter.c::bpf_base_func_proto().
2048 #. type: Plain text
2049 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2050 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2051 msgid ""
2052 "Prior to Linux 4.4, all B<bpf>() commands require the caller to have the "
2053 "B<CAP_SYS_ADMIN> capability. From Linux 4.4 onwards, an unprivileged user "
2054 "may create limited programs of type B<BPF_PROG_TYPE_SOCKET_FILTER> and "
2055 "associated maps. However they may not store kernel pointers within the maps "
2056 "and are presently limited to the following helper functions:"
2057 msgstr ""
2058 "قبل لينكس 4.4، كانت جميع أوامر B<bpf>() تتطلب أن يمتلك المستدعِي قدرة "
2059 "B<CAP_SYS_ADMIN>. بدءًا من لينكس 4.4 فصاعدًا، قد يقوم مستخدم غير ممتلك "
2060 "للامتيازات بإنشاء برامج محدودة من النوع B<BPF_PROG_TYPE_SOCKET_FILTER> "
2061 "والخرائط المرتبطة بها. ومع ذلك، لا يجوز لهم تخزين مؤشرات النواة داخل الخرائط "
2062 "وهم مقيدون حاليًا بدوال المساعدة التالية:"
2063
2064 #. type: Plain text
2065 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2066 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2067 msgid "get_random"
2068 msgstr "get_random"
2069
2070 #. type: Plain text
2071 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2072 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2073 msgid "get_smp_processor_id"
2074 msgstr "get_smp_processor_id"
2075
2076 #. type: Plain text
2077 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2078 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2079 msgid "tail_call"
2080 msgstr "tail_call"
2081
2082 #. type: Plain text
2083 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2084 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2085 msgid "ktime_get_ns"
2086 msgstr "ktime_get_ns"
2087
2088 #. type: Plain text
2089 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2090 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2091 msgid ""
2092 "Unprivileged access may be blocked by writing the value 1 to the file I</"
2093 "proc/sys/kernel/unprivileged_bpf_disabled>."
2094 msgstr ""
2095 "يمكن حظر وصول غير ذوي الامتيازات عبر كتابة القيمة 1 إلى الملف I</proc/sys/"
2096 "kernel/unprivileged_bpf_disabled>."
2097
2098 #. type: Plain text
2099 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2101 msgid ""
2102 "eBPF objects (maps and programs) can be shared between processes. For "
2103 "example, after B<fork>(2), the child inherits file descriptors referring to "
2104 "the same eBPF objects. In addition, file descriptors referring to eBPF "
2105 "objects can be transferred over UNIX domain sockets. File descriptors "
2106 "referring to eBPF objects can be duplicated in the usual way, using "
2107 "B<dup>(2) and similar calls. An eBPF object is deallocated only after all "
2108 "file descriptors referring to the object have been closed."
2109 msgstr ""
2110 "يمكن مشاركة كائنات eBPF (الخرائط والبرامج) بين العمليات. على سبيل المثال، "
2111 "بعد B<fork>(2)، يرث الابن واصفات الملفات التي تشير إلى نفس كائنات eBPF. "
2112 "بالإضافة إلى ذلك، يمكن نقل واصفات الملفات التي تشير إلى كائنات eBPF عبر "
2113 "مقابس نطاق يونكس. كما يمكن مضاهاة واصفات الملفات التي تشير إلى كائنات eBPF "
2114 "بالطريقة المعتادة، باستخدام B<dup>(2) والاستدعاءات المماثلة. يُحرر تخصيص كائن "
2115 "eBPF فقط بعد إغلاق جميع واصفات الملفات التي تشير إلى ذلك الكائن."
2116
2117 #. There are also examples for the tc classifier, in the iproute2
2118 #. project, in examples/bpf
2119 #. type: Plain text
2120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2122 msgid ""
2123 "eBPF programs can be written in a restricted C that is compiled (using the "
2124 "B<clang> compiler) into eBPF bytecode. Various features are omitted from "
2125 "this restricted C, such as loops, global variables, variadic functions, "
2126 "floating-point numbers, and passing structures as function arguments. Some "
2127 "examples can be found in the I<samples/bpf/*_kern.c> files in the kernel "
2128 "source tree."
2129 msgstr ""
2130 "يمكن كتابة برامج eBPF بلغة C مقيدة تُصرَّف (باستخدام مصرِّف B<clang>) إلى رمز "
2131 "بايتات (bytecode) لـ eBPF. حُذفت ميزات متنوعة من لغة C المقيدة هذه، مثل "
2132 "الحلقات، والمتغيرات العامة، والدوال متنوعة المعاملات، والأعداد ذات الفاصلة "
2133 "العائمة، وتمرير الهياكل كمعاملات للدوال. يمكن العثور على بعض الأمثلة في "
2134 "ملفات I<samples/bpf/*_kern.c> في شجرة مصادر النواة."
2135
2136 #. type: Plain text
2137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2139 msgid ""
2140 "The kernel contains a just-in-time (JIT) compiler that translates eBPF "
2141 "bytecode into native machine code for better performance. Before Linux "
2142 "4.15, the JIT compiler is disabled by default, but its operation can be "
2143 "controlled by writing one of the following integer strings to the file I</"
2144 "proc/sys/net/core/bpf_jit_enable>:"
2145 msgstr ""
2146 "تحتوي النواة على مصرِّف في الوقت المناسب (JIT) يترجم رمز بايتات eBPF إلى رمز "
2147 "آلة أصيل للحصول على أداء أفضل. قبل لينكس 4.15، كان مصرِّف JIT معطلاً بشكل "
2148 "مبدئي، ولكن يمكن التحكم في عمله عبر كتابة إحدى السلاسل الصحيحة التالية إلى "
2149 "الملف I</proc/sys/net/core/bpf_jit_enable>:"
2150
2151 #. type: TP
2152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2154 #, no-wrap
2155 msgid "B<0>"
2156 msgstr "B<0>"
2157
2158 #. type: Plain text
2159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2161 msgid "Disable JIT compilation (default)."
2162 msgstr "تعطيل تصريف JIT (مبدئي)."
2163
2164 #. type: TP
2165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2167 #, no-wrap
2168 msgid "B<1>"
2169 msgstr "B<1>"
2170
2171 #. type: Plain text
2172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2174 msgid "Normal compilation."
2175 msgstr "تصريف عادي."
2176
2177 #. type: TP
2178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2180 #, no-wrap
2181 msgid "B<2>"
2182 msgstr "B<2>"
2183
2184 #. type: Plain text
2185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2187 msgid ""
2188 "Debugging mode. The generated opcodes are dumped in hexadecimal into the "
2189 "kernel log. These opcodes can then be disassembled using the program "
2190 "I<tools/net/bpf_jit_disasm.c> provided in the kernel source tree."
2191 msgstr ""
2192 "وضع التنقيح. تُفرغ رموز العمليات (opcodes) المولدة بصيغة ست عشرية في سجل "
2193 "النواة. يمكن بعد ذلك تفكيك هذه الرموز باستخدام البرنامج I<tools/net/"
2194 "bpf_jit_disasm.c> المتوفر في شجرة مصادر النواة."
2195
2196 #. commit 290af86629b25ffd1ed6232c4e9107da031705cb
2197 #. type: Plain text
2198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2200 msgid ""
2201 "Since Linux 4.15, the kernel may be configured with the "
2202 "B<CONFIG_BPF_JIT_ALWAYS_ON> option. In this case, the JIT compiler is "
2203 "always enabled, and the I<bpf_jit_enable> is initialized to 1 and is "
2204 "immutable. (This kernel configuration option was provided as a mitigation "
2205 "for one of the Spectre attacks against the BPF interpreter.)"
2206 msgstr ""
2207 "بدءًا من لينكس 4.15، قد تُضبط النواة مع الخيار B<CONFIG_BPF_JIT_ALWAYS_ON>. في "
2208 "هذه الحالة، يكون مصرِّف JIT مفعلاً دائمًا، ويُهيأ I<bpf_jit_enable> إلى القيمة 1 "
2209 "ويكون غير قابل للتغيير. (وُفر خيار ضبط النواة هذا كتخفيف لإحدى هجمات Spectre "
2210 "ضد مفسر BPF.)"
2211
2212 #. #-#-#-#-# archlinux: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
2213 #. type: Plain text
2214 #. #-#-#-#-# debian-trixie: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
2215 #. Last reviewed in Linux 4.18-rc by grepping for BPF_ALU64 in arch/
2216 #. and by checking the documentation for bpf_jit_enable in
2217 #. Documentation/sysctl/net.txt
2218 #. type: Plain text
2219 #. #-#-#-#-# debian-unstable: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
2220 #. type: Plain text
2221 #. #-#-#-#-# fedora-44: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
2222 #. Last reviewed in Linux 4.18-rc by grepping for BPF_ALU64 in arch/
2223 #. and by checking the documentation for bpf_jit_enable in
2224 #. Documentation/sysctl/net.txt
2225 #. type: Plain text
2226 #. #-#-#-#-# fedora-rawhide: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
2227 #. Last reviewed in Linux 4.18-rc by grepping for BPF_ALU64 in arch/
2228 #. and by checking the documentation for bpf_jit_enable in
2229 #. Documentation/sysctl/net.txt
2230 #. type: Plain text
2231 #. #-#-#-#-# mageia-cauldron: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
2232 #. type: Plain text
2233 #. #-#-#-#-# opensuse-leap-16-1: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
2234 #. type: Plain text
2235 #. #-#-#-#-# opensuse-tumbleweed: bpf.2.pot (PACKAGE VERSION) #-#-#-#-#
2236 #. type: Plain text
2237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2239 msgid ""
2240 "The JIT compiler for eBPF is currently available for the following "
2241 "architectures:"
2242 msgstr "يتوفر مصرِّف JIT لـ eBPF حاليًا للمعماريت التالية:"
2243
2244 #. commit 0a14842f5a3c0e88a1e59fac5c3025db39721f74
2245 #. type: Plain text
2246 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2247 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2248 msgid "x86-64 (since Linux 3.18; cBPF since Linux 3.0);"
2249 msgstr "x86-64 (منذ لينكس 3.18؛ cBPF منذ لينكس 3.0)؛"
2250
2251 #. commit ddecdfcea0ae891f782ae853771c867ab51024c2
2252 #. type: Plain text
2253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2255 msgid "ARM32 (since Linux 3.18; cBPF since Linux 3.4);"
2256 msgstr "ARM32 (منذ لينكس 3.18؛ cBPF منذ لينكس 3.4)؛"
2257
2258 #. commit 2809a2087cc44b55e4377d7b9be3f7f5d2569091
2259 #. type: Plain text
2260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2262 msgid "SPARC 32 (since Linux 3.18; cBPF since Linux 3.5);"
2263 msgstr "SPARC 32 (منذ لينكس 3.18؛ cBPF منذ لينكس 3.5)؛"
2264
2265 #. commit e54bcde3d69d40023ae77727213d14f920eb264a
2266 #. type: Plain text
2267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2269 msgid "ARM-64 (since Linux 3.18);"
2270 msgstr "ARM-64 (منذ لينكس 3.18)؛"
2271
2272 #. commit c10302efe569bfd646b4c22df29577a4595b4580
2273 #. type: Plain text
2274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2276 msgid "s390 (since Linux 4.1; cBPF since Linux 3.7);"
2277 msgstr "s390 (منذ لينكس 4.1؛ cBPF منذ لينكس 3.7)؛"
2278
2279 #. commit 0ca87f05ba8bdc6791c14878464efc901ad71e99
2280 #. commit 156d0e290e969caba25f1851c52417c14d141b24
2281 #. type: Plain text
2282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2284 msgid "PowerPC 64 (since Linux 4.8; cBPF since Linux 3.1);"
2285 msgstr "PowerPC 64 (منذ لينكس 4.8؛ cBPF منذ لينكس 3.1)؛"
2286
2287 #. commit 7a12b5031c6b947cc13918237ae652b536243b76
2288 #. type: Plain text
2289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2291 msgid "SPARC 64 (since Linux 4.12);"
2292 msgstr "SPARC 64 (منذ لينكس 4.12)؛"
2293
2294 #. commit 03f5781be2c7b7e728d724ac70ba10799cc710d7
2295 #. type: Plain text
2296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2298 msgid "x86-32 (since Linux 4.18);"
2299 msgstr "x86-32 (منذ لينكس 4.18)؛"
2300
2301 #. commit c6610de353da5ca6eee5b8960e838a87a90ead0c
2302 #. commit f381bf6d82f032b7410185b35d000ea370ac706b
2303 #. type: Plain text
2304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2306 msgid "MIPS 64 (since Linux 4.18; cBPF since Linux 3.16);"
2307 msgstr "MIPS 64 (منذ لينكس 4.18؛ cBPF منذ لينكس 3.16)؛"
2308
2309 #. commit 2353ecc6f91fd15b893fa01bf85a1c7a823ee4f2
2310 #. type: Plain text
2311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2313 msgid "riscv (since Linux 5.1)."
2314 msgstr "riscv (منذ لينكس 5.1)."
2315
2316 #. type: SH
2317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2319 #, no-wrap
2320 msgid "EXAMPLES"
2321 msgstr "أمثلة"
2322
2323 #. == atomic64_add
2324 #. type: Plain text
2325 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
2326 #: opensuse-tumbleweed
2327 #, no-wrap
2328 msgid ""
2329 "#include E<lt>stdcountof.hE<gt>\n"
2330 "\\&\n"
2331 "/* bpf+sockets example:\n"
2332 " * 1. create array map of 256 elements\n"
2333 " * 2. load program that counts number of packets received\n"
2334 " * r0 = skb-E<gt>data[ETH_HLEN + offsetof(struct iphdr, protocol)]\n"
2335 " * map[r0]++\n"
2336 " * 3. attach prog_fd to raw socket via setsockopt()\n"
2337 " * 4. print number of received TCP/UDP packets every second\n"
2338 " */\n"
2339 "int\n"
2340 "main(int argc, char *argv[])\n"
2341 "{\n"
2342 " int sock, map_fd, prog_fd, key;\n"
2343 " long long value = 0, tcp_cnt, udp_cnt;\n"
2344 "\\&\n"
2345 " map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key),\n"
2346 " sizeof(value), 256);\n"
2347 " if (map_fd E<lt> 0) {\n"
2348 " printf(\"failed to create map \\[aq]%s\\[aq]\\[rs]n\", strerror(errno));\n"
2349 " /* likely not run as root */\n"
2350 " return 1;\n"
2351 " }\n"
2352 "\\&\n"
2353 " struct bpf_insn prog[] = {\n"
2354 " BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), /* r6 = r1 */\n"
2355 " BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol)),\n"
2356 " /* r0 = ip-E<gt>proto */\n"
2357 " BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4),\n"
2358 " /* *(u32 *) (fp - 4) = r0 */\n"
2359 " BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), /* r2 = fp */\n"
2360 " BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -4), /* r2 = r2 - 4 */\n"
2361 " BPF_LD_MAP_FD(BPF_REG_1, map_fd), /* r1 = map_fd */\n"
2362 " BPF_CALL_FUNC(BPF_FUNC_map_lookup_elem),\n"
2363 " /* r0 = map_lookup(r1, r2) */\n"
2364 " BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),\n"
2365 " /* if (r0 == 0) goto pc+2 */\n"
2366 " BPF_MOV64_IMM(BPF_REG_1, 1), /* r1 = 1 */\n"
2367 " BPF_XADD(BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0),\n"
2368 " /* lock *(u64 *) r0 += r1 */\n"
2369 " BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */\n"
2370 " BPF_EXIT_INSN(), /* return r0 */\n"
2371 " };\n"
2372 "\\&\n"
2373 " prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog,\n"
2374 " countof(prog), \"GPL\");\n"
2375 "\\&\n"
2376 " sock = open_raw_sock(\"lo\");\n"
2377 "\\&\n"
2378 " assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,\n"
2379 " sizeof(prog_fd)) == 0);\n"
2380 "\\&\n"
2381 " for (;;) {\n"
2382 " key = IPPROTO_TCP;\n"
2383 " assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0);\n"
2384 " key = IPPROTO_UDP;\n"
2385 " assert(bpf_lookup_elem(map_fd, &key, &udp_cnt) == 0);\n"
2386 " printf(\"TCP %lld UDP %lld packets\\[rs]n\", tcp_cnt, udp_cnt);\n"
2387 " sleep(1);\n"
2388 " }\n"
2389 "\\&\n"
2390 " return 0;\n"
2391 "}\n"
2392 msgstr ""
2393 "#include E<lt>stdcountof.hE<gt>\n"
2394 "\\&\n"
2395 "/* bpf+sockets example:\n"
2396 " * 1. create array map of 256 elements\n"
2397 " * 2. load program that counts number of packets received\n"
2398 " * r0 = skb-E<gt>data[ETH_HLEN + offsetof(struct iphdr, protocol)]\n"
2399 " * map[r0]++\n"
2400 " * 3. attach prog_fd to raw socket via setsockopt()\n"
2401 " * 4. print number of received TCP/UDP packets every second\n"
2402 " */\n"
2403 "int\n"
2404 "main(int argc, char *argv[])\n"
2405 "{\n"
2406 " int sock, map_fd, prog_fd, key;\n"
2407 " long long value = 0, tcp_cnt, udp_cnt;\n"
2408 "\\&\n"
2409 " map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key),\n"
2410 " sizeof(value), 256);\n"
2411 " if (map_fd E<lt> 0) {\n"
2412 " printf(\"failed to create map \\[aq]%s\\[aq]\\[rs]n\", strerror(errno));\n"
2413 " /* likely not run as root */\n"
2414 " return 1;\n"
2415 " }\n"
2416 "\\&\n"
2417 " struct bpf_insn prog[] = {\n"
2418 " BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), /* r6 = r1 */\n"
2419 " BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol)),\n"
2420 " /* r0 = ip-E<gt>proto */\n"
2421 " BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4),\n"
2422 " /* *(u32 *) (fp - 4) = r0 */\n"
2423 " BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), /* r2 = fp */\n"
2424 " BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -4), /* r2 = r2 - 4 */\n"
2425 " BPF_LD_MAP_FD(BPF_REG_1, map_fd), /* r1 = map_fd */\n"
2426 " BPF_CALL_FUNC(BPF_FUNC_map_lookup_elem),\n"
2427 " /* r0 = map_lookup(r1, r2) */\n"
2428 " BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),\n"
2429 " /* if (r0 == 0) goto pc+2 */\n"
2430 " BPF_MOV64_IMM(BPF_REG_1, 1), /* r1 = 1 */\n"
2431 " BPF_XADD(BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0),\n"
2432 " /* lock *(u64 *) r0 += r1 */\n"
2433 " BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */\n"
2434 " BPF_EXIT_INSN(), /* return r0 */\n"
2435 " };\n"
2436 "\\&\n"
2437 " prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog,\n"
2438 " countof(prog), \"GPL\");\n"
2439 "\\&\n"
2440 " sock = open_raw_sock(\"lo\");\n"
2441 "\\&\n"
2442 " assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,\n"
2443 " sizeof(prog_fd)) == 0);\n"
2444 "\\&\n"
2445 " for (;;) {\n"
2446 " key = IPPROTO_TCP;\n"
2447 " assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0);\n"
2448 " key = IPPROTO_UDP;\n"
2449 " assert(bpf_lookup_elem(map_fd, &key, &udp_cnt) == 0);\n"
2450 " printf(\"TCP %lld UDP %lld packets\\[rs]n\", tcp_cnt, udp_cnt);\n"
2451 " sleep(1);\n"
2452 " }\n"
2453 "\\&\n"
2454 " return 0;\n"
2455 "}\n"
2456
2457 #. type: Plain text
2458 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2459 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2460 msgid ""
2461 "Some complete working code can be found in the I<samples/bpf> directory in "
2462 "the kernel source tree."
2463 msgstr ""
2464 "يمكن العثور على بعض الأكواد العاملة الكاملة في دليل I<samples/bpf> في شجرة "
2465 "مصادر النواة."
2466
2467 #. type: SH
2468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2470 #, no-wrap
2471 msgid "SEE ALSO"
2472 msgstr "انظر أيضًا"
2473
2474 #. type: Plain text
2475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2477 msgid "B<seccomp>(2), B<bpf-helpers>(7), B<socket>(7), B<tc>(8), B<tc-bpf>(8)"
2478 msgstr "B<seccomp>(2), B<bpf-helpers>(7), B<socket>(7), B<tc>(8), B<tc-bpf>(8)"
2479
2480 #. type: Plain text
2481 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
2482 #: opensuse-tumbleweed
2483 msgid ""
2484 "Both classic and extended BPF are explained in the kernel source file "
2485 "I<Documentation/networking/filter.rst>."
2486 msgstr ""
2487 "شُرح كل من BPF التقليدي والممتد في ملف مصدر النواة I<Documentation/networking/"
2488 "filter.rst>."
2489
2490 #. type: TH
2491 #: debian-trixie
2492 #, no-wrap
2493 msgid "2024-06-15"
2494 msgstr "15 يونيو 2024"
2495
2496 #. type: TH
2497 #: debian-trixie
2498 #, no-wrap
2499 msgid "Linux man-pages 6.9.1"
2500 msgstr "صفحات دليل لينكس 6.9.1"
2501
2502 #. type: Plain text
2503 #: debian-trixie fedora-44 fedora-rawhide
2504 #, no-wrap
2505 msgid ""
2506 "enum bpf_map_type {\n"
2507 " BPF_MAP_TYPE_UNSPEC, /* Reserve 0 as invalid map type */\n"
2508 " BPF_MAP_TYPE_HASH,\n"
2509 " BPF_MAP_TYPE_ARRAY,\n"
2510 " BPF_MAP_TYPE_PROG_ARRAY,\n"
2511 " BPF_MAP_TYPE_PERF_EVENT_ARRAY,\n"
2512 " BPF_MAP_TYPE_PERCPU_HASH,\n"
2513 " BPF_MAP_TYPE_PERCPU_ARRAY,\n"
2514 " BPF_MAP_TYPE_STACK_TRACE,\n"
2515 " BPF_MAP_TYPE_CGROUP_ARRAY,\n"
2516 " BPF_MAP_TYPE_LRU_HASH,\n"
2517 " BPF_MAP_TYPE_LRU_PERCPU_HASH,\n"
2518 " BPF_MAP_TYPE_LPM_TRIE,\n"
2519 " BPF_MAP_TYPE_ARRAY_OF_MAPS,\n"
2520 " BPF_MAP_TYPE_HASH_OF_MAPS,\n"
2521 " BPF_MAP_TYPE_DEVMAP,\n"
2522 " BPF_MAP_TYPE_SOCKMAP,\n"
2523 " BPF_MAP_TYPE_CPUMAP,\n"
2524 " BPF_MAP_TYPE_XSKMAP,\n"
2525 " BPF_MAP_TYPE_SOCKHASH,\n"
2526 " BPF_MAP_TYPE_CGROUP_STORAGE,\n"
2527 " BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,\n"
2528 " BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,\n"
2529 " BPF_MAP_TYPE_QUEUE,\n"
2530 " BPF_MAP_TYPE_STACK,\n"
2531 " /* See /usr/include/linux/bpf.h for the full list. */\n"
2532 "};\n"
2533 msgstr ""
2534 "enum bpf_map_type {\n"
2535 " BPF_MAP_TYPE_UNSPEC, /* احجز 0 كنوع خريطة غير صالح */\n"
2536 " BPF_MAP_TYPE_HASH,\n"
2537 " BPF_MAP_TYPE_ARRAY,\n"
2538 " BPF_MAP_TYPE_PROG_ARRAY,\n"
2539 " BPF_MAP_TYPE_PERF_EVENT_ARRAY,\n"
2540 " BPF_MAP_TYPE_PERCPU_HASH,\n"
2541 " BPF_MAP_TYPE_PERCPU_ARRAY,\n"
2542 " BPF_MAP_TYPE_STACK_TRACE,\n"
2543 " BPF_MAP_TYPE_CGROUP_ARRAY,\n"
2544 " BPF_MAP_TYPE_LRU_HASH,\n"
2545 " BPF_MAP_TYPE_LRU_PERCPU_HASH,\n"
2546 " BPF_MAP_TYPE_LPM_TRIE,\n"
2547 " BPF_MAP_TYPE_ARRAY_OF_MAPS,\n"
2548 " BPF_MAP_TYPE_HASH_OF_MAPS,\n"
2549 " BPF_MAP_TYPE_DEVMAP,\n"
2550 " BPF_MAP_TYPE_SOCKMAP,\n"
2551 " BPF_MAP_TYPE_CPUMAP,\n"
2552 " BPF_MAP_TYPE_XSKMAP,\n"
2553 " BPF_MAP_TYPE_SOCKHASH,\n"
2554 " BPF_MAP_TYPE_CGROUP_STORAGE,\n"
2555 " BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,\n"
2556 " BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,\n"
2557 " BPF_MAP_TYPE_QUEUE,\n"
2558 " BPF_MAP_TYPE_STACK,\n"
2559 " /* انظر /usr/include/linux/bpf.h للقائمة الكاملة. */\n"
2560 "};\n"
2561
2562 #. type: Plain text
2563 #: debian-trixie fedora-44 fedora-rawhide
2564 #, no-wrap
2565 msgid ""
2566 "enum bpf_prog_type {\n"
2567 " BPF_PROG_TYPE_UNSPEC, /* Reserve 0 as invalid\n"
2568 " program type */\n"
2569 " BPF_PROG_TYPE_SOCKET_FILTER,\n"
2570 " BPF_PROG_TYPE_KPROBE,\n"
2571 " BPF_PROG_TYPE_SCHED_CLS,\n"
2572 " BPF_PROG_TYPE_SCHED_ACT,\n"
2573 " BPF_PROG_TYPE_TRACEPOINT,\n"
2574 " BPF_PROG_TYPE_XDP,\n"
2575 " BPF_PROG_TYPE_PERF_EVENT,\n"
2576 " BPF_PROG_TYPE_CGROUP_SKB,\n"
2577 " BPF_PROG_TYPE_CGROUP_SOCK,\n"
2578 " BPF_PROG_TYPE_LWT_IN,\n"
2579 " BPF_PROG_TYPE_LWT_OUT,\n"
2580 " BPF_PROG_TYPE_LWT_XMIT,\n"
2581 " BPF_PROG_TYPE_SOCK_OPS,\n"
2582 " BPF_PROG_TYPE_SK_SKB,\n"
2583 " BPF_PROG_TYPE_CGROUP_DEVICE,\n"
2584 " BPF_PROG_TYPE_SK_MSG,\n"
2585 " BPF_PROG_TYPE_RAW_TRACEPOINT,\n"
2586 " BPF_PROG_TYPE_CGROUP_SOCK_ADDR,\n"
2587 " BPF_PROG_TYPE_LWT_SEG6LOCAL,\n"
2588 " BPF_PROG_TYPE_LIRC_MODE2,\n"
2589 " BPF_PROG_TYPE_SK_REUSEPORT,\n"
2590 " BPF_PROG_TYPE_FLOW_DISSECTOR,\n"
2591 " /* See /usr/include/linux/bpf.h for the full list. */\n"
2592 "};\n"
2593 msgstr ""
2594 "enum bpf_prog_type {\n"
2595 " BPF_PROG_TYPE_UNSPEC, /* احجز 0 كنوع\n"
2596 " برنامج غير صالح */\n"
2597 " BPF_PROG_TYPE_SOCKET_FILTER,\n"
2598 " BPF_PROG_TYPE_KPROBE,\n"
2599 " BPF_PROG_TYPE_SCHED_CLS,\n"
2600 " BPF_PROG_TYPE_SCHED_ACT,\n"
2601 " BPF_PROG_TYPE_TRACEPOINT,\n"
2602 " BPF_PROG_TYPE_XDP,\n"
2603 " BPF_PROG_TYPE_PERF_EVENT,\n"
2604 " BPF_PROG_TYPE_CGROUP_SKB,\n"
2605 " BPF_PROG_TYPE_CGROUP_SOCK,\n"
2606 " BPF_PROG_TYPE_LWT_IN,\n"
2607 " BPF_PROG_TYPE_LWT_OUT,\n"
2608 " BPF_PROG_TYPE_LWT_XMIT,\n"
2609 " BPF_PROG_TYPE_SOCK_OPS,\n"
2610 " BPF_PROG_TYPE_SK_SKB,\n"
2611 " BPF_PROG_TYPE_CGROUP_DEVICE,\n"
2612 " BPF_PROG_TYPE_SK_MSG,\n"
2613 " BPF_PROG_TYPE_RAW_TRACEPOINT,\n"
2614 " BPF_PROG_TYPE_CGROUP_SOCK_ADDR,\n"
2615 " BPF_PROG_TYPE_LWT_SEG6LOCAL,\n"
2616 " BPF_PROG_TYPE_LIRC_MODE2,\n"
2617 " BPF_PROG_TYPE_SK_REUSEPORT,\n"
2618 " BPF_PROG_TYPE_FLOW_DISSECTOR,\n"
2619 " /* انظر /usr/include/linux/bpf.h للقائمة الكاملة. */\n"
2620 "};\n"
2621
2622 #. == atomic64_add
2623 #. type: Plain text
2624 #: debian-trixie
2625 #, no-wrap
2626 msgid ""
2627 "/* bpf+sockets example:\n"
2628 " * 1. create array map of 256 elements\n"
2629 " * 2. load program that counts number of packets received\n"
2630 " * r0 = skb-E<gt>data[ETH_HLEN + offsetof(struct iphdr, protocol)]\n"
2631 " * map[r0]++\n"
2632 " * 3. attach prog_fd to raw socket via setsockopt()\n"
2633 " * 4. print number of received TCP/UDP packets every second\n"
2634 " */\n"
2635 "int\n"
2636 "main(int argc, char *argv[])\n"
2637 "{\n"
2638 " int sock, map_fd, prog_fd, key;\n"
2639 " long long value = 0, tcp_cnt, udp_cnt;\n"
2640 "\\&\n"
2641 " map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key),\n"
2642 " sizeof(value), 256);\n"
2643 " if (map_fd E<lt> 0) {\n"
2644 " printf(\"failed to create map \\[aq]%s\\[aq]\\[rs]n\", strerror(errno));\n"
2645 " /* likely not run as root */\n"
2646 " return 1;\n"
2647 " }\n"
2648 "\\&\n"
2649 " struct bpf_insn prog[] = {\n"
2650 " BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), /* r6 = r1 */\n"
2651 " BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol)),\n"
2652 " /* r0 = ip-E<gt>proto */\n"
2653 " BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4),\n"
2654 " /* *(u32 *)(fp - 4) = r0 */\n"
2655 " BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), /* r2 = fp */\n"
2656 " BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -4), /* r2 = r2 - 4 */\n"
2657 " BPF_LD_MAP_FD(BPF_REG_1, map_fd), /* r1 = map_fd */\n"
2658 " BPF_CALL_FUNC(BPF_FUNC_map_lookup_elem),\n"
2659 " /* r0 = map_lookup(r1, r2) */\n"
2660 " BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),\n"
2661 " /* if (r0 == 0) goto pc+2 */\n"
2662 " BPF_MOV64_IMM(BPF_REG_1, 1), /* r1 = 1 */\n"
2663 " BPF_XADD(BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0),\n"
2664 " /* lock *(u64 *) r0 += r1 */\n"
2665 " BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */\n"
2666 " BPF_EXIT_INSN(), /* return r0 */\n"
2667 " };\n"
2668 "\\&\n"
2669 " prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog,\n"
2670 " sizeof(prog) / sizeof(prog[0]), \"GPL\");\n"
2671 "\\&\n"
2672 " sock = open_raw_sock(\"lo\");\n"
2673 "\\&\n"
2674 " assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,\n"
2675 " sizeof(prog_fd)) == 0);\n"
2676 "\\&\n"
2677 " for (;;) {\n"
2678 " key = IPPROTO_TCP;\n"
2679 " assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0);\n"
2680 " key = IPPROTO_UDP;\n"
2681 " assert(bpf_lookup_elem(map_fd, &key, &udp_cnt) == 0);\n"
2682 " printf(\"TCP %lld UDP %lld packets\\[rs]n\", tcp_cnt, udp_cnt);\n"
2683 " sleep(1);\n"
2684 " }\n"
2685 "\\&\n"
2686 " return 0;\n"
2687 "}\n"
2688 msgstr ""
2689 "/* bpf+sockets example:\n"
2690 " * 1. create array map of 256 elements\n"
2691 " * 2. load program that counts number of packets received\n"
2692 " * r0 = skb-E<gt>data[ETH_HLEN + offsetof(struct iphdr, protocol)]\n"
2693 " * map[r0]++\n"
2694 " * 3. attach prog_fd to raw socket via setsockopt()\n"
2695 " * 4. print number of received TCP/UDP packets every second\n"
2696 " */\n"
2697 "int\n"
2698 "main(int argc, char *argv[])\n"
2699 "{\n"
2700 " int sock, map_fd, prog_fd, key;\n"
2701 " long long value = 0, tcp_cnt, udp_cnt;\n"
2702 "\\&\n"
2703 " map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key),\n"
2704 " sizeof(value), 256);\n"
2705 " if (map_fd E<lt> 0) {\n"
2706 " printf(\"failed to create map \\[aq]%s\\[aq]\\[rs]n\", strerror(errno));\n"
2707 " /* likely not run as root */\n"
2708 " return 1;\n"
2709 " }\n"
2710 "\\&\n"
2711 " struct bpf_insn prog[] = {\n"
2712 " BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), /* r6 = r1 */\n"
2713 " BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol)),\n"
2714 " /* r0 = ip-E<gt>proto */\n"
2715 " BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4),\n"
2716 " /* *(u32 *)(fp - 4) = r0 */\n"
2717 " BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), /* r2 = fp */\n"
2718 " BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -4), /* r2 = r2 - 4 */\n"
2719 " BPF_LD_MAP_FD(BPF_REG_1, map_fd), /* r1 = map_fd */\n"
2720 " BPF_CALL_FUNC(BPF_FUNC_map_lookup_elem),\n"
2721 " /* r0 = map_lookup(r1, r2) */\n"
2722 " BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),\n"
2723 " /* if (r0 == 0) goto pc+2 */\n"
2724 " BPF_MOV64_IMM(BPF_REG_1, 1), /* r1 = 1 */\n"
2725 " BPF_XADD(BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0),\n"
2726 " /* lock *(u64 *) r0 += r1 */\n"
2727 " BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */\n"
2728 " BPF_EXIT_INSN(), /* return r0 */\n"
2729 " };\n"
2730 "\\&\n"
2731 " prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog,\n"
2732 " sizeof(prog) / sizeof(prog[0]), \"GPL\");\n"
2733 "\\&\n"
2734 " sock = open_raw_sock(\"lo\");\n"
2735 "\\&\n"
2736 " assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,\n"
2737 " sizeof(prog_fd)) == 0);\n"
2738 "\\&\n"
2739 " for (;;) {\n"
2740 " key = IPPROTO_TCP;\n"
2741 " assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0);\n"
2742 " key = IPPROTO_UDP;\n"
2743 " assert(bpf_lookup_elem(map_fd, &key, &udp_cnt) == 0);\n"
2744 " printf(\"TCP %lld UDP %lld packets\\[rs]n\", tcp_cnt, udp_cnt);\n"
2745 " sleep(1);\n"
2746 " }\n"
2747 "\\&\n"
2748 " return 0;\n"
2749 "}\n"
2750
2751 #. type: Plain text
2752 #: debian-trixie fedora-44 fedora-rawhide
2753 msgid ""
2754 "Both classic and extended BPF are explained in the kernel source file "
2755 "I<Documentation/networking/filter.txt>."
2756 msgstr ""
2757 "شُرح كل من BPF التقليدي والممتد في ملف مصدر النواة I<Documentation/networking/"
2758 "filter.txt>."
2759
2760 #. type: TH
2761 #: fedora-44 fedora-rawhide
2762 #, no-wrap
2763 msgid "2025-01-05"
2764 msgstr "5 يناير 2025"
2765
2766 #. type: TH
2767 #: fedora-44 fedora-rawhide
2768 #, no-wrap
2769 msgid "Linux man-pages 6.13"
2770 msgstr "صفحات دليل لينكس 6.13"
2771
2772 #. == atomic64_add
2773 #. type: Plain text
2774 #: fedora-44 fedora-rawhide
2775 #, no-wrap
2776 msgid ""
2777 "/* bpf+sockets example:\n"
2778 " * 1. create array map of 256 elements\n"
2779 " * 2. load program that counts number of packets received\n"
2780 " * r0 = skb-E<gt>data[ETH_HLEN + offsetof(struct iphdr, protocol)]\n"
2781 " * map[r0]++\n"
2782 " * 3. attach prog_fd to raw socket via setsockopt()\n"
2783 " * 4. print number of received TCP/UDP packets every second\n"
2784 " */\n"
2785 "int\n"
2786 "main(int argc, char *argv[])\n"
2787 "{\n"
2788 " int sock, map_fd, prog_fd, key;\n"
2789 " long long value = 0, tcp_cnt, udp_cnt;\n"
2790 "\\&\n"
2791 " map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key),\n"
2792 " sizeof(value), 256);\n"
2793 " if (map_fd E<lt> 0) {\n"
2794 " printf(\"failed to create map \\[aq]%s\\[aq]\\[rs]n\", strerror(errno));\n"
2795 " /* likely not run as root */\n"
2796 " return 1;\n"
2797 " }\n"
2798 "\\&\n"
2799 " struct bpf_insn prog[] = {\n"
2800 " BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), /* r6 = r1 */\n"
2801 " BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol)),\n"
2802 " /* r0 = ip-E<gt>proto */\n"
2803 " BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4),\n"
2804 " /* *(u32 *) (fp - 4) = r0 */\n"
2805 " BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), /* r2 = fp */\n"
2806 " BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -4), /* r2 = r2 - 4 */\n"
2807 " BPF_LD_MAP_FD(BPF_REG_1, map_fd), /* r1 = map_fd */\n"
2808 " BPF_CALL_FUNC(BPF_FUNC_map_lookup_elem),\n"
2809 " /* r0 = map_lookup(r1, r2) */\n"
2810 " BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),\n"
2811 " /* if (r0 == 0) goto pc+2 */\n"
2812 " BPF_MOV64_IMM(BPF_REG_1, 1), /* r1 = 1 */\n"
2813 " BPF_XADD(BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0),\n"
2814 " /* lock *(u64 *) r0 += r1 */\n"
2815 " BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */\n"
2816 " BPF_EXIT_INSN(), /* return r0 */\n"
2817 " };\n"
2818 "\\&\n"
2819 " prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog,\n"
2820 " sizeof(prog) / sizeof(prog[0]), \"GPL\");\n"
2821 "\\&\n"
2822 " sock = open_raw_sock(\"lo\");\n"
2823 "\\&\n"
2824 " assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,\n"
2825 " sizeof(prog_fd)) == 0);\n"
2826 "\\&\n"
2827 " for (;;) {\n"
2828 " key = IPPROTO_TCP;\n"
2829 " assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0);\n"
2830 " key = IPPROTO_UDP;\n"
2831 " assert(bpf_lookup_elem(map_fd, &key, &udp_cnt) == 0);\n"
2832 " printf(\"TCP %lld UDP %lld packets\\[rs]n\", tcp_cnt, udp_cnt);\n"
2833 " sleep(1);\n"
2834 " }\n"
2835 "\\&\n"
2836 " return 0;\n"
2837 "}\n"
2838 msgstr ""
2839 "/* bpf+sockets example:\n"
2840 " * 1. create array map of 256 elements\n"
2841 " * 2. load program that counts number of packets received\n"
2842 " * r0 = skb-E<gt>data[ETH_HLEN + offsetof(struct iphdr, protocol)]\n"
2843 " * map[r0]++\n"
2844 " * 3. attach prog_fd to raw socket via setsockopt()\n"
2845 " * 4. print number of received TCP/UDP packets every second\n"
2846 " */\n"
2847 "int\n"
2848 "main(int argc, char *argv[])\n"
2849 "{\n"
2850 " int sock, map_fd, prog_fd, key;\n"
2851 " long long value = 0, tcp_cnt, udp_cnt;\n"
2852 "\\&\n"
2853 " map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key),\n"
2854 " sizeof(value), 256);\n"
2855 " if (map_fd E<lt> 0) {\n"
2856 " printf(\"failed to create map \\[aq]%s\\[aq]\\[rs]n\", strerror(errno));\n"
2857 " /* likely not run as root */\n"
2858 " return 1;\n"
2859 " }\n"
2860 "\\&\n"
2861 " struct bpf_insn prog[] = {\n"
2862 " BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), /* r6 = r1 */\n"
2863 " BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol)),\n"
2864 " /* r0 = ip-E<gt>proto */\n"
2865 " BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4),\n"
2866 " /* *(u32 *) (fp - 4) = r0 */\n"
2867 " BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), /* r2 = fp */\n"
2868 " BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -4), /* r2 = r2 - 4 */\n"
2869 " BPF_LD_MAP_FD(BPF_REG_1, map_fd), /* r1 = map_fd */\n"
2870 " BPF_CALL_FUNC(BPF_FUNC_map_lookup_elem),\n"
2871 " /* r0 = map_lookup(r1, r2) */\n"
2872 " BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),\n"
2873 " /* if (r0 == 0) goto pc+2 */\n"
2874 " BPF_MOV64_IMM(BPF_REG_1, 1), /* r1 = 1 */\n"
2875 " BPF_XADD(BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0),\n"
2876 " /* lock *(u64 *) r0 += r1 */\n"
2877 " BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */\n"
2878 " BPF_EXIT_INSN(), /* return r0 */\n"
2879 " };\n"
2880 "\\&\n"
2881 " prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog,\n"
2882 " sizeof(prog) / sizeof(prog[0]), \"GPL\");\n"
2883 "\\&\n"
2884 " sock = open_raw_sock(\"lo\");\n"
2885 "\\&\n"
2886 " assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,\n"
2887 " sizeof(prog_fd)) == 0);\n"
2888 "\\&\n"
2889 " for (;;) {\n"
2890 " key = IPPROTO_TCP;\n"
2891 " assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0);\n"
2892 " key = IPPROTO_UDP;\n"
2893 " assert(bpf_lookup_elem(map_fd, &key, &udp_cnt) == 0);\n"
2894 " printf(\"TCP %lld UDP %lld packets\\[rs]n\", tcp_cnt, udp_cnt);\n"
2895 " sleep(1);\n"
2896 " }\n"
2897 "\\&\n"
2898 " return 0;\n"
2899 "}\n"
2900
2901 #. type: TH
2902 #: mageia-cauldron
2903 #, no-wrap
2904 msgid "Linux man-pages 6.17"
2905 msgstr "صفحات دليل لينكس 6.17"
2906
2907 #. type: TH
2908 #: opensuse-leap-16-1 opensuse-tumbleweed
2909 #, no-wrap
2910 msgid "Linux man-pages (unreleased)"
2911 msgstr "صفحات دليل لينكس (لم تصدر بعد)"