| 1 |
# Russian translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Azamat Hackimov <[email protected]>, 2013-2014, 2017. |
| 5 |
# Dmitry Bolkhovskikh <[email protected]>, 2017. |
| 6 |
# Vladislav <[email protected]>, 2015. |
| 7 |
# Yuri Kozlov <[email protected]>, 2011-2019. |
| 8 |
# Иван Павлов <[email protected]>, 2017, 2019. |
| 9 |
msgid "" |
| 10 |
msgstr "" |
| 11 |
"Project-Id-Version: manpages-l10n\n" |
| 12 |
"POT-Creation-Date: 2026-06-05 06:26+0200\n" |
| 13 |
"PO-Revision-Date: 2024-12-21 19:50+0300\n" |
| 14 |
"Last-Translator: Yuri Kozlov <[email protected]>\n" |
| 15 |
"Language-Team: Russian <[email protected]>\n" |
| 16 |
"Language: ru\n" |
| 17 |
"MIME-Version: 1.0\n" |
| 18 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 19 |
"Content-Transfer-Encoding: 8bit\n" |
| 20 |
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " |
| 21 |
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " |
| 22 |
"(n%100>=11 && n%100<=14)? 2 : 3);\n" |
| 23 |
"X-Generator: Lokalize 2.0\n" |
| 24 |
|
| 25 |
#. type: TH |
| 26 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 27 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 28 |
#, no-wrap |
| 29 |
msgid "getservent_r" |
| 30 |
msgstr "" |
| 31 |
|
| 32 |
#. type: TH |
| 33 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 34 |
#, no-wrap |
| 35 |
msgid "2026-02-22" |
| 36 |
msgstr "22 февраля 2026 г." |
| 37 |
|
| 38 |
#. type: TH |
| 39 |
#: archlinux debian-unstable |
| 40 |
#, fuzzy, no-wrap |
| 41 |
#| msgid "Linux man-pages 6.17" |
| 42 |
msgid "Linux man-pages 6.18" |
| 43 |
msgstr "Справочные страницы Linux 6.17" |
| 44 |
|
| 45 |
#. type: SH |
| 46 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 47 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 48 |
#, no-wrap |
| 49 |
msgid "NAME" |
| 50 |
msgstr "НАИМЕНОВАНИЕ" |
| 51 |
|
| 52 |
#. type: Plain text |
| 53 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 54 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 55 |
msgid "" |
| 56 |
"getservent_r, getservbyname_r, getservbyport_r - get service entry " |
| 57 |
"(reentrant)" |
| 58 |
msgstr "" |
| 59 |
"getservent_r, getservbyname_r, getservbyport_r - возвращает запись о службе " |
| 60 |
"(реентерабельные версии)" |
| 61 |
|
| 62 |
#. type: SH |
| 63 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 64 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 65 |
#, no-wrap |
| 66 |
msgid "LIBRARY" |
| 67 |
msgstr "БИБЛИОТЕКА" |
| 68 |
|
| 69 |
#. type: Plain text |
| 70 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 71 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 72 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 73 |
msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)" |
| 74 |
|
| 75 |
#. type: SH |
| 76 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 77 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 78 |
#, no-wrap |
| 79 |
msgid "SYNOPSIS" |
| 80 |
msgstr "СИНТАКСИС" |
| 81 |
|
| 82 |
#. type: Plain text |
| 83 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 84 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 85 |
#, no-wrap |
| 86 |
msgid "B<#include E<lt>netdb.hE<gt>>\n" |
| 87 |
msgstr "B<#include E<lt>netdb.hE<gt>>\n" |
| 88 |
|
| 89 |
#. type: Plain text |
| 90 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 91 |
#: opensuse-tumbleweed |
| 92 |
#, no-wrap |
| 93 |
msgid "" |
| 94 |
"B<int getservent_r(>size_t size;\n" |
| 95 |
"B< struct servent *restrict >I<result_buf>B<,>\n" |
| 96 |
"B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n" |
| 97 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 98 |
"B<int getservbyname_r(>size_t size;\n" |
| 99 |
"B< const char *restrict >I<name>B<,>\n" |
| 100 |
"B< const char *restrict >I<proto>B<,>\n" |
| 101 |
"B< struct servent *restrict >I<result_buf>B<,>\n" |
| 102 |
"B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n" |
| 103 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 104 |
"B<int getservbyport_r(>size_t size;\n" |
| 105 |
"B< int >I<port>B<,>\n" |
| 106 |
"B< const char *restrict >I<proto>B<,>\n" |
| 107 |
"B< struct servent *restrict >I<result_buf>B<,>\n" |
| 108 |
"B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n" |
| 109 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 110 |
msgstr "" |
| 111 |
|
| 112 |
#. type: Plain text |
| 113 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 114 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 115 |
msgid "" |
| 116 |
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" |
| 117 |
msgstr "" |
| 118 |
"Требования макроса тестирования свойств для glibc (см. " |
| 119 |
"B<feature_test_macros>(7)):" |
| 120 |
|
| 121 |
#. type: Plain text |
| 122 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 123 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 124 |
#, fuzzy |
| 125 |
#| msgid "" |
| 126 |
#| "B<getservent_r>(),\n" |
| 127 |
#| "B<getservbyname_r>(),\n" |
| 128 |
#| "B<getservbyport_r>()" |
| 129 |
msgid "B<getservent_r>(), B<getservbyname_r>(), B<getservbyport_r>():" |
| 130 |
msgstr "" |
| 131 |
"B<getservent_r>(),\n" |
| 132 |
"B<getservbyname_r>(),\n" |
| 133 |
"B<getservbyport_r>()" |
| 134 |
|
| 135 |
#. type: Plain text |
| 136 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 137 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 138 |
#, no-wrap |
| 139 |
msgid "" |
| 140 |
" Since glibc 2.19:\n" |
| 141 |
" _DEFAULT_SOURCE\n" |
| 142 |
" glibc 2.19 and earlier:\n" |
| 143 |
" _BSD_SOURCE || _SVID_SOURCE\n" |
| 144 |
msgstr "" |
| 145 |
" начиная с glibc 2.19:\n" |
| 146 |
" _DEFAULT_SOURCE\n" |
| 147 |
" в glibc 2.19 и старее:\n" |
| 148 |
" _BSD_SOURCE || _SVID_SOURCE\n" |
| 149 |
|
| 150 |
#. type: SH |
| 151 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 152 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 153 |
#, no-wrap |
| 154 |
msgid "DESCRIPTION" |
| 155 |
msgstr "ОПИСАНИЕ" |
| 156 |
|
| 157 |
#. type: Plain text |
| 158 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 159 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 160 |
msgid "" |
| 161 |
"The B<getservent_r>(), B<getservbyname_r>(), and B<getservbyport_r>() " |
| 162 |
"functions are the reentrant equivalents of, respectively, B<getservent>(3), " |
| 163 |
"B<getservbyname>(3), and B<getservbyport>(3). They differ in the way that " |
| 164 |
"the I<servent> structure is returned, and in the function calling signature " |
| 165 |
"and return value. This manual page describes just the differences from the " |
| 166 |
"nonreentrant functions." |
| 167 |
msgstr "" |
| 168 |
"Функции B<getservent_r>(), B<getservbyname_r>() и B<getservbyport_r>() " |
| 169 |
"являются реентерабельными эквивалентами B<getservent>(3), " |
| 170 |
"B<getservbyname>(3) и B<getservbyport>(3), соответственно. Они отличаются " |
| 171 |
"способом возврата структуры I<servent> и списком параметров и типом " |
| 172 |
"возвращаемого значения. В этой справочной странице описаны только различия с " |
| 173 |
"нереентерабельными функциями." |
| 174 |
|
| 175 |
#. type: Plain text |
| 176 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 177 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 178 |
msgid "" |
| 179 |
"Instead of returning a pointer to a statically allocated I<servent> " |
| 180 |
"structure as the function result, these functions copy the structure into " |
| 181 |
"the location pointed to by I<result_buf>." |
| 182 |
msgstr "" |
| 183 |
"Вместо возврата указателя на статически выделенную структуру I<servent> в " |
| 184 |
"качестве результата эти функции копируют структуру в расположение, указанное " |
| 185 |
"I<result_buf>." |
| 186 |
|
| 187 |
#. I can find no information on the required/recommended buffer size; |
| 188 |
#. the nonreentrant functions use a 1024 byte buffer -- mtk. |
| 189 |
#. type: Plain text |
| 190 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 191 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 192 |
#, fuzzy |
| 193 |
#| msgid "" |
| 194 |
#| "The I<buf> array is used to store the string fields pointed to by the " |
| 195 |
#| "returned I<servent> structure. (The nonreentrant functions allocate " |
| 196 |
#| "these strings in static storage.) The size of this array is specified in " |
| 197 |
#| "I<buflen>. If I<buf> is too small, the call fails with the error " |
| 198 |
#| "B<ERANGE>, and the caller must try again with a larger buffer. (A buffer " |
| 199 |
#| "of length 1024 bytes should be sufficient for most applications.)" |
| 200 |
msgid "" |
| 201 |
"The I<buf> array is used to store the string fields pointed to by the " |
| 202 |
"returned I<servent> structure. (The nonreentrant functions allocate these " |
| 203 |
"strings in static storage.) The size of this array is specified in " |
| 204 |
"I<size>. If I<buf> is too small, the call fails with the error B<ERANGE>, " |
| 205 |
"and the caller must try again with a larger buffer. (A buffer of size 1024 " |
| 206 |
"bytes should be sufficient for most applications.)" |
| 207 |
msgstr "" |
| 208 |
"Массив I<buf> используется для хранения строковых полей из возвращаемой " |
| 209 |
"структуры I<servent> (нереентерабельные функции выделяют эти строки из " |
| 210 |
"статического хранилища). Размер данного массива задаётся в I<buflen>. Если " |
| 211 |
"I<buf> слишком мал, то вызов завершается с ошибкой B<ERANGE>, вызывающий " |
| 212 |
"должен его повторить с большим буфером (для большинства приложений должно " |
| 213 |
"быть достаточно буфера длиной 1024 байт)." |
| 214 |
|
| 215 |
#. type: Plain text |
| 216 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 217 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 218 |
msgid "" |
| 219 |
"If the function call successfully obtains a service record, then I<*result> " |
| 220 |
"is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL." |
| 221 |
msgstr "" |
| 222 |
"Если вызов получил запись о службе, то I<*result> указывает на " |
| 223 |
"I<result_buf>; в противном случае I<*result> устанавливается в NULL." |
| 224 |
|
| 225 |
#. type: SH |
| 226 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 227 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 228 |
#, no-wrap |
| 229 |
msgid "RETURN VALUE" |
| 230 |
msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" |
| 231 |
|
| 232 |
#. type: Plain text |
| 233 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 234 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 235 |
msgid "" |
| 236 |
"On success, these functions return 0. On error, they return one of the " |
| 237 |
"positive error numbers listed in errors." |
| 238 |
msgstr "" |
| 239 |
"При успешном выполнении эти функции возвращают 0. При ошибке возвращается " |
| 240 |
"одно из положительных значений ошибок." |
| 241 |
|
| 242 |
#. type: Plain text |
| 243 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 244 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 245 |
msgid "" |
| 246 |
"On error, record not found (B<getservbyname_r>(), B<getservbyport_r>()), or " |
| 247 |
"end of input (B<getservent_r>()) I<result> is set to NULL." |
| 248 |
msgstr "" |
| 249 |
"При ошибке, отсутствии записи (B<getservbyname_r>(), B<getservbyport_r>()) " |
| 250 |
"или конце данных (B<getservent_r>()) значение I<result> равно NULL." |
| 251 |
|
| 252 |
#. type: SH |
| 253 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 254 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 255 |
#, no-wrap |
| 256 |
msgid "ERRORS" |
| 257 |
msgstr "ОШИБКИ" |
| 258 |
|
| 259 |
#. type: TP |
| 260 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 261 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 262 |
#, no-wrap |
| 263 |
msgid "B<ENOENT>" |
| 264 |
msgstr "B<ENOENT>" |
| 265 |
|
| 266 |
#. type: Plain text |
| 267 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 268 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 269 |
msgid "(B<getservent_r>()) No more records in database." |
| 270 |
msgstr "(B<getservent_r>()) Больше нет записей в базе данных." |
| 271 |
|
| 272 |
#. type: TP |
| 273 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 274 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 275 |
#, no-wrap |
| 276 |
msgid "B<ERANGE>" |
| 277 |
msgstr "B<ERANGE>" |
| 278 |
|
| 279 |
#. type: Plain text |
| 280 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 281 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
#, fuzzy |
| 283 |
#| msgid "" |
| 284 |
#| "I<buf> is too small. Try again with a larger buffer (and increased " |
| 285 |
#| "I<buflen>)." |
| 286 |
msgid "" |
| 287 |
"I<buf> is too small. Try again with a larger buffer (and increased I<size>)." |
| 288 |
msgstr "" |
| 289 |
"Размер I<buf> слишком мал. Попробуйте ещё раз с большим буфером (и " |
| 290 |
"увеличенным значением I<buflen>)." |
| 291 |
|
| 292 |
#. type: SH |
| 293 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 294 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 295 |
#, no-wrap |
| 296 |
msgid "ATTRIBUTES" |
| 297 |
msgstr "АТРИБУТЫ" |
| 298 |
|
| 299 |
#. type: Plain text |
| 300 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 301 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 302 |
msgid "" |
| 303 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 304 |
msgstr "Описание терминов данного раздела смотрите в B<attributes>(7)." |
| 305 |
|
| 306 |
#. type: tbl table |
| 307 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 308 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 309 |
#, no-wrap |
| 310 |
msgid "Interface" |
| 311 |
msgstr "Интерфейс" |
| 312 |
|
| 313 |
#. type: tbl table |
| 314 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 315 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 316 |
#, no-wrap |
| 317 |
msgid "Attribute" |
| 318 |
msgstr "Атрибут" |
| 319 |
|
| 320 |
#. type: tbl table |
| 321 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 322 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 323 |
#, no-wrap |
| 324 |
msgid "Value" |
| 325 |
msgstr "Значение" |
| 326 |
|
| 327 |
#. type: tbl table |
| 328 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 329 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 330 |
#, no-wrap |
| 331 |
msgid ".na\n" |
| 332 |
msgstr ".na\n" |
| 333 |
|
| 334 |
#. type: tbl table |
| 335 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 336 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 337 |
#, no-wrap |
| 338 |
msgid ".nh\n" |
| 339 |
msgstr ".nh\n" |
| 340 |
|
| 341 |
#. type: tbl table |
| 342 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 343 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 344 |
#, no-wrap |
| 345 |
msgid "" |
| 346 |
"B<getservent_r>(),\n" |
| 347 |
"B<getservbyname_r>(),\n" |
| 348 |
"B<getservbyport_r>()" |
| 349 |
msgstr "" |
| 350 |
"B<getservent_r>(),\n" |
| 351 |
"B<getservbyname_r>(),\n" |
| 352 |
"B<getservbyport_r>()" |
| 353 |
|
| 354 |
#. type: tbl table |
| 355 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 356 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 357 |
#, no-wrap |
| 358 |
msgid "Thread safety" |
| 359 |
msgstr "Безвредность в нитях" |
| 360 |
|
| 361 |
#. type: tbl table |
| 362 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 363 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 364 |
#, no-wrap |
| 365 |
msgid "MT-Safe locale" |
| 366 |
msgstr "MT-Safe locale" |
| 367 |
|
| 368 |
#. type: SH |
| 369 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 370 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 371 |
#, no-wrap |
| 372 |
msgid "VERSIONS" |
| 373 |
msgstr "ВЕРСИИ" |
| 374 |
|
| 375 |
#. type: Plain text |
| 376 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 377 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 378 |
msgid "" |
| 379 |
"Functions with similar names exist on some other systems, though typically " |
| 380 |
"with different calling signatures." |
| 381 |
msgstr "" |
| 382 |
"Функции с похожими именами есть и в других системах, хотя и с другим набором " |
| 383 |
"параметров." |
| 384 |
|
| 385 |
#. type: SH |
| 386 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 387 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 388 |
#, no-wrap |
| 389 |
msgid "STANDARDS" |
| 390 |
msgstr "СТАНДАРТЫ" |
| 391 |
|
| 392 |
#. type: Plain text |
| 393 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 394 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 395 |
msgid "GNU." |
| 396 |
msgstr "GNU." |
| 397 |
|
| 398 |
#. type: SH |
| 399 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 400 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 401 |
#, no-wrap |
| 402 |
msgid "EXAMPLES" |
| 403 |
msgstr "ПРИМЕРЫ" |
| 404 |
|
| 405 |
#. type: Plain text |
| 406 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 407 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 408 |
#, fuzzy |
| 409 |
#| msgid "" |
| 410 |
#| "The program below uses B<getservbyport_r>() to retrieve the service " |
| 411 |
#| "record for the port and protocol named in its first command-line " |
| 412 |
#| "argument. If a third (integer) command-line argument is supplied, it is " |
| 413 |
#| "used as the initial value for I<buflen>; if B<getservbyport_r>() fails " |
| 414 |
#| "with the error B<ERANGE>, the program retries with larger buffer sizes. " |
| 415 |
#| "The following shell session shows a couple of sample runs:" |
| 416 |
msgid "" |
| 417 |
"The program below uses B<getservbyport_r>() to retrieve the service record " |
| 418 |
"for the port and protocol named in its first command-line argument. If a " |
| 419 |
"third (integer) command-line argument is supplied, it is used as the initial " |
| 420 |
"value for I<size>; if B<getservbyport_r>() fails with the error B<ERANGE>, " |
| 421 |
"the program retries with larger buffer sizes. The following shell session " |
| 422 |
"shows a couple of sample runs:" |
| 423 |
msgstr "" |
| 424 |
"Программа, представленная ниже, использует B<getservbyport_r>() для " |
| 425 |
"получения записи о службе для заданного порта и протокола, указанных в " |
| 426 |
"командной строке. Если задан и третий параметр (целое), то он используется " |
| 427 |
"как начальное значение I<buflen>; если B<getservbyport_r>() завершается с " |
| 428 |
"ошибкой B<ERANGE>, то программа повторяет попытки с большими значениями " |
| 429 |
"буфера. Пара примеров работы в сеансовой оболочке:" |
| 430 |
|
| 431 |
#. type: Plain text |
| 432 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 433 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 434 |
#, fuzzy, no-wrap |
| 435 |
#| msgid "" |
| 436 |
#| "$B< ./a.out 7 tcp 1>\n" |
| 437 |
#| "ERANGE! Retrying with larger buffer\n" |
| 438 |
#| "getservbyport_r() returned: 0 (success) (buflen=87)\n" |
| 439 |
#| "s_name=echo; s_proto=tcp; s_port=7; aliases=\n" |
| 440 |
#| "$B< ./a.out 77777 tcp>\n" |
| 441 |
#| "getservbyport_r() returned: 0 (success) (buflen=1024)\n" |
| 442 |
#| "Call failed/record not found\n" |
| 443 |
msgid "" |
| 444 |
"$B< ./a.out 7 tcp 1>\n" |
| 445 |
"ERANGE! Retrying with larger buffer\n" |
| 446 |
"getservbyport_r() returned: 0 (success) (size=87)\n" |
| 447 |
"s_name=echo; s_proto=tcp; s_port=7; aliases=\n" |
| 448 |
"$B< ./a.out 77777 tcp>\n" |
| 449 |
"getservbyport_r() returned: 0 (success) (size=1024)\n" |
| 450 |
"Call failed/record not found\n" |
| 451 |
msgstr "" |
| 452 |
"$B< ./a.out 7 tcp 1>\n" |
| 453 |
"ERANGE! Повтор с большим буфером\n" |
| 454 |
"getservbyport_r() returned: 0 (success) (buflen=87)\n" |
| 455 |
"s_name=echo; s_proto=tcp; s_port=7; aliases=\n" |
| 456 |
"$B< ./a.out 77777 tcp>\n" |
| 457 |
"getservbyport_r() returned: 0 (success) (buflen=1024)\n" |
| 458 |
"Ошибка вызова/запись не найдена\n" |
| 459 |
|
| 460 |
#. type: SS |
| 461 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 462 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 463 |
#, no-wrap |
| 464 |
msgid "Program source" |
| 465 |
msgstr "Исходный код программы" |
| 466 |
|
| 467 |
#. type: Plain text |
| 468 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 469 |
#, no-wrap |
| 470 |
msgid "" |
| 471 |
"#define _GNU_SOURCE\n" |
| 472 |
"#include E<lt>ctype.hE<gt>\n" |
| 473 |
"#include E<lt>errno.hE<gt>\n" |
| 474 |
"#include E<lt>netdb.hE<gt>\n" |
| 475 |
"#include E<lt>stdio.hE<gt>\n" |
| 476 |
"#include E<lt>stdlib.hE<gt>\n" |
| 477 |
"#include E<lt>string.hE<gt>\n" |
| 478 |
"\\&\n" |
| 479 |
"#define MAX_BUF 10000\n" |
| 480 |
"\\&\n" |
| 481 |
"#define streq(...) (strcmp(__VA_ARGS__) == 0)\n" |
| 482 |
"\\&\n" |
| 483 |
"int\n" |
| 484 |
"main(int argc, char *argv[])\n" |
| 485 |
"{\n" |
| 486 |
" int size, erange_cnt, port, s;\n" |
| 487 |
" struct servent result_buf;\n" |
| 488 |
" struct servent *result;\n" |
| 489 |
" char buf[MAX_BUF];\n" |
| 490 |
" char *protop;\n" |
| 491 |
"\\&\n" |
| 492 |
" if (argc E<lt> 3) {\n" |
| 493 |
" printf(\"Usage: %s port-num proto-name [size]\\[rs]n\", argv[0]);\n" |
| 494 |
" exit(EXIT_FAILURE);\n" |
| 495 |
" }\n" |
| 496 |
"\\&\n" |
| 497 |
" port = htons(atoi(argv[1]));\n" |
| 498 |
" protop = (streq(argv[2], \"null\") ||\n" |
| 499 |
" streq(argv[2], \"NULL\")) ? NULL : argv[2];\n" |
| 500 |
"\\&\n" |
| 501 |
" size = 1024;\n" |
| 502 |
" if (argc E<gt> 3)\n" |
| 503 |
" size = atoi(argv[3]);\n" |
| 504 |
"\\&\n" |
| 505 |
" if (size E<gt> MAX_BUF) {\n" |
| 506 |
" printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n" |
| 507 |
" exit(EXIT_FAILURE);\n" |
| 508 |
" }\n" |
| 509 |
"\\&\n" |
| 510 |
" erange_cnt = 0;\n" |
| 511 |
" do {\n" |
| 512 |
" s = getservbyport_r(port, protop, &result_buf,\n" |
| 513 |
" buf, size, &result);\n" |
| 514 |
" if (s == ERANGE) {\n" |
| 515 |
" if (erange_cnt == 0)\n" |
| 516 |
" printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n" |
| 517 |
" erange_cnt++;\n" |
| 518 |
"\\&\n" |
| 519 |
" /* Increment a byte at a time so we can see exactly\n" |
| 520 |
" what size buffer was required. */\n" |
| 521 |
"\\&\n" |
| 522 |
" size++;\n" |
| 523 |
"\\&\n" |
| 524 |
" if (size E<gt> MAX_BUF) {\n" |
| 525 |
" printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n" |
| 526 |
" exit(EXIT_FAILURE);\n" |
| 527 |
" }\n" |
| 528 |
" }\n" |
| 529 |
" } while (s == ERANGE);\n" |
| 530 |
"\\&\n" |
| 531 |
" printf(\"getservbyport_r() returned: %s (size=%d)\\[rs]n\",\n" |
| 532 |
" (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n" |
| 533 |
" strerror(s), size);\n" |
| 534 |
"\\&\n" |
| 535 |
" if (s != 0 || result == NULL) {\n" |
| 536 |
" printf(\"Call failed/record not found\\[rs]n\");\n" |
| 537 |
" exit(EXIT_FAILURE);\n" |
| 538 |
" }\n" |
| 539 |
"\\&\n" |
| 540 |
" printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n" |
| 541 |
" result_buf.s_name, result_buf.s_proto,\n" |
| 542 |
" ntohs(result_buf.s_port));\n" |
| 543 |
" for (char **p = result_buf.s_aliases; *p != NULL; p++)\n" |
| 544 |
" printf(\"%s \", *p);\n" |
| 545 |
" printf(\"\\[rs]n\");\n" |
| 546 |
"\\&\n" |
| 547 |
" exit(EXIT_SUCCESS);\n" |
| 548 |
"}\n" |
| 549 |
msgstr "" |
| 550 |
|
| 551 |
#. SRC END |
| 552 |
#. type: SH |
| 553 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 554 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 555 |
#, no-wrap |
| 556 |
msgid "SEE ALSO" |
| 557 |
msgstr "СМОТРИТЕ ТАКЖЕ" |
| 558 |
|
| 559 |
#. type: Plain text |
| 560 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 561 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 562 |
msgid "B<getservent>(3), B<services>(5)" |
| 563 |
msgstr "B<getservent>(3), B<services>(5)" |
| 564 |
|
| 565 |
#. type: TH |
| 566 |
#: debian-trixie |
| 567 |
#, no-wrap |
| 568 |
msgid "2024-06-15" |
| 569 |
msgstr "15 июня 2024 г." |
| 570 |
|
| 571 |
#. type: TH |
| 572 |
#: debian-trixie |
| 573 |
#, no-wrap |
| 574 |
msgid "Linux man-pages 6.9.1" |
| 575 |
msgstr "Страницы руководства Linux 6.9.1" |
| 576 |
|
| 577 |
#. type: Plain text |
| 578 |
#: debian-trixie |
| 579 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 580 |
msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)" |
| 581 |
|
| 582 |
#. type: Plain text |
| 583 |
#: debian-trixie |
| 584 |
#, no-wrap |
| 585 |
msgid "" |
| 586 |
"B<int getservent_r(struct servent *restrict >I<result_buf>B<,>\n" |
| 587 |
"B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n" |
| 588 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 589 |
"B<int getservbyname_r(const char *restrict >I<name>B<,>\n" |
| 590 |
"B< const char *restrict >I<proto>B<,>\n" |
| 591 |
"B< struct servent *restrict >I<result_buf>B<,>\n" |
| 592 |
"B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n" |
| 593 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 594 |
"B<int getservbyport_r(int >I<port>B<,>\n" |
| 595 |
"B< const char *restrict >I<proto>B<,>\n" |
| 596 |
"B< struct servent *restrict >I<result_buf>B<,>\n" |
| 597 |
"B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n" |
| 598 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 599 |
msgstr "" |
| 600 |
|
| 601 |
#. I can find no information on the required/recommended buffer size; |
| 602 |
#. the nonreentrant functions use a 1024 byte buffer -- mtk. |
| 603 |
#. type: Plain text |
| 604 |
#: debian-trixie |
| 605 |
msgid "" |
| 606 |
"The I<buf> array is used to store the string fields pointed to by the " |
| 607 |
"returned I<servent> structure. (The nonreentrant functions allocate these " |
| 608 |
"strings in static storage.) The size of this array is specified in " |
| 609 |
"I<buflen>. If I<buf> is too small, the call fails with the error B<ERANGE>, " |
| 610 |
"and the caller must try again with a larger buffer. (A buffer of length " |
| 611 |
"1024 bytes should be sufficient for most applications.)" |
| 612 |
msgstr "" |
| 613 |
"Массив I<buf> используется для хранения строковых полей из возвращаемой " |
| 614 |
"структуры I<servent> (нереентерабельные функции выделяют эти строки из " |
| 615 |
"статического хранилища). Размер данного массива задаётся в I<buflen>. Если " |
| 616 |
"I<buf> слишком мал, то вызов завершается с ошибкой B<ERANGE>, вызывающий " |
| 617 |
"должен его повторить с большим буфером (для большинства приложений должно " |
| 618 |
"быть достаточно буфера длиной 1024 байт)." |
| 619 |
|
| 620 |
#. type: Plain text |
| 621 |
#: debian-trixie |
| 622 |
msgid "" |
| 623 |
"I<buf> is too small. Try again with a larger buffer (and increased " |
| 624 |
"I<buflen>)." |
| 625 |
msgstr "" |
| 626 |
"Размер I<buf> слишком мал. Попробуйте ещё раз с большим буфером (и " |
| 627 |
"увеличенным значением I<buflen>)." |
| 628 |
|
| 629 |
#. type: Plain text |
| 630 |
#: debian-trixie |
| 631 |
msgid "" |
| 632 |
"The program below uses B<getservbyport_r>() to retrieve the service record " |
| 633 |
"for the port and protocol named in its first command-line argument. If a " |
| 634 |
"third (integer) command-line argument is supplied, it is used as the initial " |
| 635 |
"value for I<buflen>; if B<getservbyport_r>() fails with the error " |
| 636 |
"B<ERANGE>, the program retries with larger buffer sizes. The following " |
| 637 |
"shell session shows a couple of sample runs:" |
| 638 |
msgstr "" |
| 639 |
"Программа, представленная ниже, использует B<getservbyport_r>() для " |
| 640 |
"получения записи о службе для заданного порта и протокола, указанных в " |
| 641 |
"командной строке. Если задан и третий параметр (целое), то он используется " |
| 642 |
"как начальное значение I<buflen>; если B<getservbyport_r>() завершается с " |
| 643 |
"ошибкой B<ERANGE>, то программа повторяет попытки с большими значениями " |
| 644 |
"буфера. Пара примеров работы в сеансовой оболочке:" |
| 645 |
|
| 646 |
#. type: Plain text |
| 647 |
#: debian-trixie |
| 648 |
#, no-wrap |
| 649 |
msgid "" |
| 650 |
"$B< ./a.out 7 tcp 1>\n" |
| 651 |
"ERANGE! Retrying with larger buffer\n" |
| 652 |
"getservbyport_r() returned: 0 (success) (buflen=87)\n" |
| 653 |
"s_name=echo; s_proto=tcp; s_port=7; aliases=\n" |
| 654 |
"$B< ./a.out 77777 tcp>\n" |
| 655 |
"getservbyport_r() returned: 0 (success) (buflen=1024)\n" |
| 656 |
"Call failed/record not found\n" |
| 657 |
msgstr "" |
| 658 |
"$B< ./a.out 7 tcp 1>\n" |
| 659 |
"ERANGE! Повтор с большим буфером\n" |
| 660 |
"getservbyport_r() returned: 0 (success) (buflen=87)\n" |
| 661 |
"s_name=echo; s_proto=tcp; s_port=7; aliases=\n" |
| 662 |
"$B< ./a.out 77777 tcp>\n" |
| 663 |
"getservbyport_r() returned: 0 (success) (buflen=1024)\n" |
| 664 |
"Ошибка вызова/запись не найдена\n" |
| 665 |
|
| 666 |
#. type: Plain text |
| 667 |
#: debian-trixie |
| 668 |
#, no-wrap |
| 669 |
msgid "" |
| 670 |
"#define _GNU_SOURCE\n" |
| 671 |
"#include E<lt>ctype.hE<gt>\n" |
| 672 |
"#include E<lt>errno.hE<gt>\n" |
| 673 |
"#include E<lt>netdb.hE<gt>\n" |
| 674 |
"#include E<lt>stdio.hE<gt>\n" |
| 675 |
"#include E<lt>stdlib.hE<gt>\n" |
| 676 |
"#include E<lt>string.hE<gt>\n" |
| 677 |
"\\&\n" |
| 678 |
"#define MAX_BUF 10000\n" |
| 679 |
"\\&\n" |
| 680 |
"int\n" |
| 681 |
"main(int argc, char *argv[])\n" |
| 682 |
"{\n" |
| 683 |
" int buflen, erange_cnt, port, s;\n" |
| 684 |
" struct servent result_buf;\n" |
| 685 |
" struct servent *result;\n" |
| 686 |
" char buf[MAX_BUF];\n" |
| 687 |
" char *protop;\n" |
| 688 |
"\\&\n" |
| 689 |
" if (argc E<lt> 3) {\n" |
| 690 |
" printf(\"Usage: %s port-num proto-name [buflen]\\[rs]n\", argv[0]);\n" |
| 691 |
" exit(EXIT_FAILURE);\n" |
| 692 |
" }\n" |
| 693 |
"\\&\n" |
| 694 |
" port = htons(atoi(argv[1]));\n" |
| 695 |
" protop = (strcmp(argv[2], \"null\") == 0 ||\n" |
| 696 |
" strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n" |
| 697 |
"\\&\n" |
| 698 |
" buflen = 1024;\n" |
| 699 |
" if (argc E<gt> 3)\n" |
| 700 |
" buflen = atoi(argv[3]);\n" |
| 701 |
"\\&\n" |
| 702 |
" if (buflen E<gt> MAX_BUF) {\n" |
| 703 |
" printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n" |
| 704 |
" exit(EXIT_FAILURE);\n" |
| 705 |
" }\n" |
| 706 |
"\\&\n" |
| 707 |
" erange_cnt = 0;\n" |
| 708 |
" do {\n" |
| 709 |
" s = getservbyport_r(port, protop, &result_buf,\n" |
| 710 |
" buf, buflen, &result);\n" |
| 711 |
" if (s == ERANGE) {\n" |
| 712 |
" if (erange_cnt == 0)\n" |
| 713 |
" printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n" |
| 714 |
" erange_cnt++;\n" |
| 715 |
"\\&\n" |
| 716 |
" /* Increment a byte at a time so we can see exactly\n" |
| 717 |
" what size buffer was required. */\n" |
| 718 |
"\\&\n" |
| 719 |
" buflen++;\n" |
| 720 |
"\\&\n" |
| 721 |
" if (buflen E<gt> MAX_BUF) {\n" |
| 722 |
" printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n" |
| 723 |
" exit(EXIT_FAILURE);\n" |
| 724 |
" }\n" |
| 725 |
" }\n" |
| 726 |
" } while (s == ERANGE);\n" |
| 727 |
"\\&\n" |
| 728 |
" printf(\"getservbyport_r() returned: %s (buflen=%d)\\[rs]n\",\n" |
| 729 |
" (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n" |
| 730 |
" strerror(s), buflen);\n" |
| 731 |
"\\&\n" |
| 732 |
" if (s != 0 || result == NULL) {\n" |
| 733 |
" printf(\"Call failed/record not found\\[rs]n\");\n" |
| 734 |
" exit(EXIT_FAILURE);\n" |
| 735 |
" }\n" |
| 736 |
"\\&\n" |
| 737 |
" printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n" |
| 738 |
" result_buf.s_name, result_buf.s_proto,\n" |
| 739 |
" ntohs(result_buf.s_port));\n" |
| 740 |
" for (char **p = result_buf.s_aliases; *p != NULL; p++)\n" |
| 741 |
" printf(\"%s \", *p);\n" |
| 742 |
" printf(\"\\[rs]n\");\n" |
| 743 |
"\\&\n" |
| 744 |
" exit(EXIT_SUCCESS);\n" |
| 745 |
"}\n" |
| 746 |
msgstr "" |
| 747 |
|
| 748 |
#. type: TH |
| 749 |
#: fedora-44 fedora-rawhide |
| 750 |
#, no-wrap |
| 751 |
msgid "2024-12-24" |
| 752 |
msgstr "24 декабря 2024 г." |
| 753 |
|
| 754 |
#. type: TH |
| 755 |
#: fedora-44 fedora-rawhide |
| 756 |
#, no-wrap |
| 757 |
msgid "Linux man-pages 6.13" |
| 758 |
msgstr "Страницы руководства Linux 6.13" |
| 759 |
|
| 760 |
#. type: Plain text |
| 761 |
#: fedora-44 fedora-rawhide |
| 762 |
#, no-wrap |
| 763 |
msgid "" |
| 764 |
"B<int getservent_r(struct servent *restrict >I<result_buf>B<,>\n" |
| 765 |
"B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n" |
| 766 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 767 |
"B<int getservbyname_r(const char *restrict >I<name>B<,>\n" |
| 768 |
"B< const char *restrict >I<proto>B<,>\n" |
| 769 |
"B< struct servent *restrict >I<result_buf>B<,>\n" |
| 770 |
"B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n" |
| 771 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 772 |
"B<int getservbyport_r(int >I<port>B<,>\n" |
| 773 |
"B< const char *restrict >I<proto>B<,>\n" |
| 774 |
"B< struct servent *restrict >I<result_buf>B<,>\n" |
| 775 |
"B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n" |
| 776 |
"B< struct servent **restrict >I<result>B<);>\n" |
| 777 |
msgstr "" |
| 778 |
|
| 779 |
#. type: Plain text |
| 780 |
#: fedora-44 fedora-rawhide |
| 781 |
#, no-wrap |
| 782 |
msgid "" |
| 783 |
"#define _GNU_SOURCE\n" |
| 784 |
"#include E<lt>ctype.hE<gt>\n" |
| 785 |
"#include E<lt>errno.hE<gt>\n" |
| 786 |
"#include E<lt>netdb.hE<gt>\n" |
| 787 |
"#include E<lt>stdio.hE<gt>\n" |
| 788 |
"#include E<lt>stdlib.hE<gt>\n" |
| 789 |
"#include E<lt>string.hE<gt>\n" |
| 790 |
"\\&\n" |
| 791 |
"#define MAX_BUF 10000\n" |
| 792 |
"\\&\n" |
| 793 |
"int\n" |
| 794 |
"main(int argc, char *argv[])\n" |
| 795 |
"{\n" |
| 796 |
" int size, erange_cnt, port, s;\n" |
| 797 |
" struct servent result_buf;\n" |
| 798 |
" struct servent *result;\n" |
| 799 |
" char buf[MAX_BUF];\n" |
| 800 |
" char *protop;\n" |
| 801 |
"\\&\n" |
| 802 |
" if (argc E<lt> 3) {\n" |
| 803 |
" printf(\"Usage: %s port-num proto-name [size]\\[rs]n\", argv[0]);\n" |
| 804 |
" exit(EXIT_FAILURE);\n" |
| 805 |
" }\n" |
| 806 |
"\\&\n" |
| 807 |
" port = htons(atoi(argv[1]));\n" |
| 808 |
" protop = (strcmp(argv[2], \"null\") == 0 ||\n" |
| 809 |
" strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n" |
| 810 |
"\\&\n" |
| 811 |
" size = 1024;\n" |
| 812 |
" if (argc E<gt> 3)\n" |
| 813 |
" size = atoi(argv[3]);\n" |
| 814 |
"\\&\n" |
| 815 |
" if (size E<gt> MAX_BUF) {\n" |
| 816 |
" printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n" |
| 817 |
" exit(EXIT_FAILURE);\n" |
| 818 |
" }\n" |
| 819 |
"\\&\n" |
| 820 |
" erange_cnt = 0;\n" |
| 821 |
" do {\n" |
| 822 |
" s = getservbyport_r(port, protop, &result_buf,\n" |
| 823 |
" buf, size, &result);\n" |
| 824 |
" if (s == ERANGE) {\n" |
| 825 |
" if (erange_cnt == 0)\n" |
| 826 |
" printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n" |
| 827 |
" erange_cnt++;\n" |
| 828 |
"\\&\n" |
| 829 |
" /* Increment a byte at a time so we can see exactly\n" |
| 830 |
" what size buffer was required. */\n" |
| 831 |
"\\&\n" |
| 832 |
" size++;\n" |
| 833 |
"\\&\n" |
| 834 |
" if (size E<gt> MAX_BUF) {\n" |
| 835 |
" printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n" |
| 836 |
" exit(EXIT_FAILURE);\n" |
| 837 |
" }\n" |
| 838 |
" }\n" |
| 839 |
" } while (s == ERANGE);\n" |
| 840 |
"\\&\n" |
| 841 |
" printf(\"getservbyport_r() returned: %s (size=%d)\\[rs]n\",\n" |
| 842 |
" (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n" |
| 843 |
" strerror(s), size);\n" |
| 844 |
"\\&\n" |
| 845 |
" if (s != 0 || result == NULL) {\n" |
| 846 |
" printf(\"Call failed/record not found\\[rs]n\");\n" |
| 847 |
" exit(EXIT_FAILURE);\n" |
| 848 |
" }\n" |
| 849 |
"\\&\n" |
| 850 |
" printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n" |
| 851 |
" result_buf.s_name, result_buf.s_proto,\n" |
| 852 |
" ntohs(result_buf.s_port));\n" |
| 853 |
" for (char **p = result_buf.s_aliases; *p != NULL; p++)\n" |
| 854 |
" printf(\"%s \", *p);\n" |
| 855 |
" printf(\"\\[rs]n\");\n" |
| 856 |
"\\&\n" |
| 857 |
" exit(EXIT_SUCCESS);\n" |
| 858 |
"}\n" |
| 859 |
msgstr "" |
| 860 |
|
| 861 |
#. type: TH |
| 862 |
#: mageia-cauldron |
| 863 |
#, no-wrap |
| 864 |
msgid "2025-09-21" |
| 865 |
msgstr "21 сентября 2025 г." |
| 866 |
|
| 867 |
#. type: TH |
| 868 |
#: mageia-cauldron |
| 869 |
#, no-wrap |
| 870 |
msgid "Linux man-pages 6.17" |
| 871 |
msgstr "Страницы руководства Linux 6.17" |
| 872 |
|
| 873 |
#. type: Plain text |
| 874 |
#: mageia-cauldron |
| 875 |
#, no-wrap |
| 876 |
msgid "" |
| 877 |
"#define _GNU_SOURCE\n" |
| 878 |
"#include E<lt>ctype.hE<gt>\n" |
| 879 |
"#include E<lt>errno.hE<gt>\n" |
| 880 |
"#include E<lt>netdb.hE<gt>\n" |
| 881 |
"#include E<lt>stdio.hE<gt>\n" |
| 882 |
"#include E<lt>stdlib.hE<gt>\n" |
| 883 |
"#include E<lt>string.hE<gt>\n" |
| 884 |
"\\&\n" |
| 885 |
"#define MAX_BUF 10000\n" |
| 886 |
"\\&\n" |
| 887 |
"int\n" |
| 888 |
"main(int argc, char *argv[])\n" |
| 889 |
"{\n" |
| 890 |
" int size, erange_cnt, port, s;\n" |
| 891 |
" struct servent result_buf;\n" |
| 892 |
" struct servent *result;\n" |
| 893 |
" char buf[MAX_BUF];\n" |
| 894 |
" char *protop;\n" |
| 895 |
"\\&\n" |
| 896 |
" if (argc E<lt> 3) {\n" |
| 897 |
" printf(\"Usage: %s port-num proto-name [size]\\[rs]n\", argv[0]);\n" |
| 898 |
" exit(EXIT_FAILURE);\n" |
| 899 |
" }\n" |
| 900 |
"\\&\n" |
| 901 |
" port = htons(atoi(argv[1]));\n" |
| 902 |
" protop = (strcmp(argv[2], \"null\") == 0 ||\n" |
| 903 |
" strcmp(argv[2], \"NULL\") == 0) ? NULL : argv[2];\n" |
| 904 |
"\\&\n" |
| 905 |
" size = 1024;\n" |
| 906 |
" if (argc E<gt> 3)\n" |
| 907 |
" size = atoi(argv[3]);\n" |
| 908 |
"\\&\n" |
| 909 |
" if (size E<gt> MAX_BUF) {\n" |
| 910 |
" printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n" |
| 911 |
" exit(EXIT_FAILURE);\n" |
| 912 |
" }\n" |
| 913 |
"\\&\n" |
| 914 |
" erange_cnt = 0;\n" |
| 915 |
" do {\n" |
| 916 |
" s = getservbyport_r(port, protop, &result_buf,\n" |
| 917 |
" buf, size, &result);\n" |
| 918 |
" if (s == ERANGE) {\n" |
| 919 |
" if (erange_cnt == 0)\n" |
| 920 |
" printf(\"ERANGE! Retrying with larger buffer\\[rs]n\");\n" |
| 921 |
" erange_cnt++;\n" |
| 922 |
"\\&\n" |
| 923 |
" /* Increment a byte at a time so we can see exactly\n" |
| 924 |
" what size buffer was required. */\n" |
| 925 |
"\\&\n" |
| 926 |
" size++;\n" |
| 927 |
"\\&\n" |
| 928 |
" if (size E<gt> MAX_BUF) {\n" |
| 929 |
" printf(\"Exceeded buffer limit (%d)\\[rs]n\", MAX_BUF);\n" |
| 930 |
" exit(EXIT_FAILURE);\n" |
| 931 |
" }\n" |
| 932 |
" }\n" |
| 933 |
" } while (s == ERANGE);\n" |
| 934 |
"\\&\n" |
| 935 |
" printf(\"getservbyport_r() returned: %s (size=%d)\\[rs]n\",\n" |
| 936 |
" (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n" |
| 937 |
" strerror(s), size);\n" |
| 938 |
"\\&\n" |
| 939 |
" if (s != 0 || result == NULL) {\n" |
| 940 |
" printf(\"Call failed/record not found\\[rs]n\");\n" |
| 941 |
" exit(EXIT_FAILURE);\n" |
| 942 |
" }\n" |
| 943 |
"\\&\n" |
| 944 |
" printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n" |
| 945 |
" result_buf.s_name, result_buf.s_proto,\n" |
| 946 |
" ntohs(result_buf.s_port));\n" |
| 947 |
" for (char **p = result_buf.s_aliases; *p != NULL; p++)\n" |
| 948 |
" printf(\"%s \", *p);\n" |
| 949 |
" printf(\"\\[rs]n\");\n" |
| 950 |
"\\&\n" |
| 951 |
" exit(EXIT_SUCCESS);\n" |
| 952 |
"}\n" |
| 953 |
msgstr "" |
| 954 |
|
| 955 |
#. type: TH |
| 956 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 957 |
#, no-wrap |
| 958 |
msgid "Linux man-pages (unreleased)" |
| 959 |
msgstr "Страницы руководства Linux (не выпущены)" |