This is the multi-page printable view of this section. Click here to print.
man3
- 1: Linux cli command seed48_r
- 2: Linux cli command XShapeGetRectangles
- 3: Linux cli command Moose_Cookbook_Legacy_Table_ClassMetaclasspm
- 4: Linux cli command SIMPLEQ_ENTRY
- 5: Linux cli command wctype
- 6: Linux cli command lgamma
- 7: Linux cli command malloc_hook
- 8: Linux cli command XtSessionGetToken
- 9: Linux cli command zip_source_function_create
- 10: Linux cli command HTTP_Configpm
- 11: Linux cli command isprint_l
- 12: Linux cli command Net_DNS_RR_CNAMEpm
- 13: Linux cli command XML_DOM_Parserpm
- 14: Linux cli command Sub_Quotepm
- 15: Linux cli command wcswidth
- 16: Linux cli command XtMakeResizeRequest
- 17: Linux cli command Image_ExifTool_OOXMLpm
- 18: Linux cli command procps_misc
- 19: Linux cli command getttyent
- 20: Linux cli command scalbln
- 21: Linux cli command XdbeBeginIdiom
- 22: Linux cli command logbf
- 23: Linux cli command Net_DBus_Test_MockIteratorpm
- 24: Linux cli command sinh
- 25: Linux cli command wcslen
- 26: Linux cli command XtPopup
- 27: Linux cli command zip_error_init
- 28: Linux cli command Image_ExifTool_Lang_frpm
- 29: Linux cli command iswlower
- 30: Linux cli command truncf
- 31: Linux cli command gai_cancel
- 32: Linux cli command sa_family_ttype
- 33: Linux cli command TAILQ_SWAP
- 34: Linux cli command XdbeGetBackBufferAttributes
- 35: Linux cli command XML_RegExppm
- 36: Linux cli command le64toh
- 37: Linux cli command pcap_list_tstamp_typespcap
- 38: Linux cli command initstate
- 39: Linux cli command timevaltype
- 40: Linux cli command Mail_Fieldpm
- 41: Linux cli command PA_FLAG_SHORTconst
- 42: Linux cli command putw
- 43: Linux cli command XauWriteAuth
- 44: Linux cli command zip_register_progress_callback
- 45: Linux cli command vwarn
- 46: Linux cli command freopen
- 47: Linux cli command Net_DBus_Annotationpm
- 48: Linux cli command Regexp_Common_URI_waispm
- 49: Linux cli command Tk_eventpm
- 50: Linux cli command pthread_cleanup_pop
- 51: Linux cli command X11_Protocol_Connection_INETFHpm
- 52: Linux cli command zip_source_make_command_bitmap
- 53: Linux cli command strcasecmp
- 54: Linux cli command uint16_ttype
- 55: Linux cli command Jcodepm
- 56: Linux cli command X11_Protocol_Connection_UNIXFHpm
- 57: Linux cli command Image_ExifTool_Lang_plpm
- 58: Linux cli command pcap_fopen_offlinepcap
- 59: Linux cli command IO_ScalarArraypm
- 60: Linux cli command scalbnl
- 61: Linux cli command svc_getreq
- 62: Linux cli command Image_ExifTool_HTMLpm
- 63: Linux cli command Image_ExifTool_VCardpm
- 64: Linux cli command posix_spawnp
- 65: Linux cli command XtRegisterDrawable
- 66: Linux cli command XtSetValues
- 67: Linux cli command significand
- 68: Linux cli command getutline
- 69: Linux cli command XShm
- 70: Linux cli command regfree
- 71: Linux cli command STAILQ_INSERT_HEAD
- 72: Linux cli command Tk_LabFramepm
- 73: Linux cli command XtOffset
- 74: Linux cli command TAILQ_HEAD
- 75: Linux cli command Tk_Popuppm
- 76: Linux cli command XtSetWMColormapWindows
- 77: Linux cli command Moose_Meta_Classpm
- 78: Linux cli command realloc
- 79: Linux cli command setutxent
- 80: Linux cli command HTML_FormatMarkdownpm
- 81: Linux cli command strtoull
- 82: Linux cli command XtGetValues
- 83: Linux cli command XML_DOM_ElementDeclpm
- 84: Linux cli command htole64
- 85: Linux cli command Net_DNS_SEC_RSApm
- 86: Linux cli command round
- 87: Linux cli command Spreadsheet_ParseExcelpm
- 88: Linux cli command procps_pids
- 89: Linux cli command scalbl
- 90: Linux cli command Net_Server_Proto_SSLpm
- 91: Linux cli command Tk_DropSitepm
- 92: Linux cli command Tk_Textpm
- 93: Linux cli command Net_DNS_RR_PXpm
- 94: Linux cli command pthread_kill_other_threads_np
- 95: Linux cli command tdestroy
- 96: Linux cli command SLIST_INIT
- 97: Linux cli command strcspn
- 98: Linux cli command XtRemoveBlockHook
- 99: Linux cli command IO_Wrappm
- 100: Linux cli command Moose_Cookbook_Basics_Person_BUILDARGSAndBUILDpm
- 101: Linux cli command WWW_Mechanize_Cookbookpm
- 102: Linux cli command getchar
- 103: Linux cli command HTML_Tree_AboutObjectspm
- 104: Linux cli command Spreadsheet_ParseExcel_Workbookpm
- 105: Linux cli command XtVaGetSubresources
- 106: Linux cli command zip_fopen_index_encrypted
- 107: Linux cli command Image_ExifTool_TagLookuppm
- 108: Linux cli command mmap64
- 109: Linux cli command pthread_tryjoin_np
- 110: Linux cli command ts_read
- 111: Linux cli command XtAddGrab
- 112: Linux cli command mbstate_ttype
- 113: Linux cli command htobe16
- 114: Linux cli command pcap_datalink_val_to_description_or_dltpcap
- 115: Linux cli command getmntent
- 116: Linux cli command XtOwnSelection
- 117: Linux cli command fts_children
- 118: Linux cli command sockaddr_in6type
- 119: Linux cli command ts_close_restricted
- 120: Linux cli command xdrmem_create
- 121: Linux cli command zip_file_extra_fields_count_by_id
- 122: Linux cli command XtDispatchEvent
- 123: Linux cli command gid_ttype
- 124: Linux cli command Net_DNS_RR_CDSpm
- 125: Linux cli command Regexp_Common_URI_RFC2396pm
- 126: Linux cli command ts_get_eventpath
- 127: Linux cli command zip_error_clear
- 128: Linux cli command pthread_atfork
- 129: Linux cli command XtDatabase
- 130: Linux cli command strfromf
- 131: Linux cli command getrpcport
- 132: Linux cli command pcap_set_buffer_sizepcap
- 133: Linux cli command Net_RawIP_libpcappm
- 134: Linux cli command strtoq
- 135: Linux cli command HTML_TreeBuilderpm
- 136: Linux cli command XShapeQueryExtents
- 137: Linux cli command pthread_join
- 138: Linux cli command random
- 139: Linux cli command tcflush
- 140: Linux cli command Moose_Meta_Role_Attributepm
- 141: Linux cli command tanhf
- 142: Linux cli command Tk_Bitmappm
- 143: Linux cli command getmntent_r
- 144: Linux cli command Net_DNS_SEC_DSApm
- 145: Linux cli command JSONpm
- 146: Linux cli command secure_getenv
- 147: Linux cli command XML_Handler_Subspm
- 148: Linux cli command iswxdigit
- 149: Linux cli command sigmask
- 150: Linux cli command Spreadsheet_WriteExcel_Worksheetpm
- 151: Linux cli command freeaddrinfo
- 152: Linux cli command XML_DOM_Attrpm
- 153: Linux cli command XShapeQueryVersion
- 154: Linux cli command XtGetSelectionValue
- 155: Linux cli command Moose_Cookbook_Basics_Company_Subtypespm
- 156: Linux cli command Net_DNS_Packetpm
- 157: Linux cli command NetPacket_TCPpm
- 158: Linux cli command posix_fallocate
- 159: Linux cli command strcmp
- 160: Linux cli command X11_Protocol_Ext_XC_MISCpm
- 161: Linux cli command Package_Stashpm
- 162: Linux cli command XML_ESISParserpm
- 163: Linux cli command XtMapWidget
- 164: Linux cli command Regexp_Common_delimitedpm
- 165: Linux cli command Image_ExifTool_MWGpm
- 166: Linux cli command putgrent
- 167: Linux cli command TAILQ_INSERT_BEFORE
- 168: Linux cli command funlockfile
- 169: Linux cli command Sub_Identifypm
- 170: Linux cli command HTML_Element_traversepm
- 171: Linux cli command Image_ExifTool_MXFpm
- 172: Linux cli command printf_functiontype
- 173: Linux cli command getdate_r
- 174: Linux cli command islessequal
- 175: Linux cli command JSON_backportPP_Compat5006pm
- 176: Linux cli command URI__punycodepm
- 177: Linux cli command WWW_RobotRules_AnyDBM_Filepm
- 178: Linux cli command vfprintf
- 179: Linux cli command XtSetMultiClickTime
- 180: Linux cli command strerror_l
- 181: Linux cli command sprintf
- 182: Linux cli command Net_DNS_RR_Apm
- 183: Linux cli command rint
- 184: Linux cli command Net_DBus_ProxyObjectpm
- 185: Linux cli command Net_DNS_RR_L64pm
- 186: Linux cli command POD2_JA_Text_LineFoldpm
- 187: Linux cli command pthread_rwlockattr_getkind_np
- 188: Linux cli command zip_file_extra_field_get
- 189: Linux cli command XShapeCombineRectangles
- 190: Linux cli command XtAddExposureToRegion
- 191: Linux cli command finitel
- 192: Linux cli command fmal
- 193: Linux cli command sigsetjmp
- 194: Linux cli command Tk_Photopm
- 195: Linux cli command nexttowardl
- 196: Linux cli command X11_Protocol_Connectionpm
- 197: Linux cli command XauReadAuth
- 198: Linux cli command utmpname
- 199: Linux cli command _Static_assert
- 200: Linux cli command va_start
- 201: Linux cli command finite
- 202: Linux cli command tcsetattr
- 203: Linux cli command Net_Server_Forkpm
- 204: Linux cli command XML_PatAct_PatternTemplpm
- 205: Linux cli command HTML_FormatPSpm
- 206: Linux cli command Image_ExifTool_GeoTiffpm
- 207: Linux cli command Tk_Buttonpm
- 208: Linux cli command Tk_Optionmenupm
- 209: Linux cli command yn
- 210: Linux cli command htons
- 211: Linux cli command Net_HTTPpm
- 212: Linux cli command setgrent
- 213: Linux cli command vasprintf
- 214: Linux cli command pcap_strerrorpcap
- 215: Linux cli command tgammal
- 216: Linux cli command HTML_TokeParserpm
- 217: Linux cli command Regexp_Common_URIpm
- 218: Linux cli command getservbyport_r
- 219: Linux cli command pthread_attr_getstackaddr
- 220: Linux cli command Tk_bindtagspm
- 221: Linux cli command wchar_ttype
- 222: Linux cli command pthread_attr_getschedpolicy
- 223: Linux cli command string
- 224: Linux cli command XtVaSetSubvalues
- 225: Linux cli command IPC_Shareablepm
- 226: Linux cli command XtGetActionKeysym
- 227: Linux cli command int64_ttype
- 228: Linux cli command Moose_Rolepm
- 229: Linux cli command getprotoent_r
- 230: Linux cli command Image_ExifTool_NikonCustompm
- 231: Linux cli command malloc_set_state
- 232: Linux cli command isalnum_l
- 233: Linux cli command mcheck_pedantic
- 234: Linux cli command Net_Server_Multiplexpm
- 235: Linux cli command Regexp_Common_URI_tvpm
- 236: Linux cli command X11_Protocolpm
- 237: Linux cli command XShmQueryVersion
- 238: Linux cli command Parallel_ForkManagerpm
- 239: Linux cli command zip_source_file
- 240: Linux cli command gmtime
- 241: Linux cli command Image_ExifTool_PNGpm
- 242: Linux cli command HUGE_VALF
- 243: Linux cli command Tk_NoteBookpm
- 244: Linux cli command mode_ttype
- 245: Linux cli command Net_DNS_Resolver_cygwinpm
- 246: Linux cli command pcap_dump_closepcap
- 247: Linux cli command Pod_Selectpm
- 248: Linux cli command strtok_r
- 249: Linux cli command XtGrabKeyboard
- 250: Linux cli command __freading
- 251: Linux cli command pcap_dump_flushpcap
- 252: Linux cli command POD2_JA_Unicode_LineBreakpm
- 253: Linux cli command Image_ExifTool_PhaseOnepm
- 254: Linux cli command setkey_r
- 255: Linux cli command Net_DBus_Test_MockObjectpm
- 256: Linux cli command XtAddInput
- 257: Linux cli command Net_IPpm
- 258: Linux cli command getchar_unlocked
- 259: Linux cli command Net_DBus_RemoteObjectpm
- 260: Linux cli command svc_unregister
- 261: Linux cli command Image_ExifTool_SigmaRawpm
- 262: Linux cli command WWW_Mechanizepm
- 263: Linux cli command Spreadsheet_WriteExcel_Workbookpm
- 264: Linux cli command XtCallbackNone
- 265: Linux cli command XtRemoveSignal
- 266: Linux cli command HTTP_Request_Commonpm
- 267: Linux cli command imaxabs
- 268: Linux cli command pthread_mutex_unlock
- 269: Linux cli command XtIsWidget
- 270: Linux cli command zip_source_seek_compute_offset
- 271: Linux cli command signgam
- 272: Linux cli command XtSetArg
- 273: Linux cli command getdtablesize
- 274: Linux cli command Spreadsheet_WriteExcel_Chart_Scatterpm
- 275: Linux cli command Types_Serialiser_Errorpm
- 276: Linux cli command XShmAttach
- 277: Linux cli command HTML_AsSubspm
- 278: Linux cli command Moose_Manual_Contributingpm
- 279: Linux cli command zip_get_archive_flag
- 280: Linux cli command strtouq
- 281: Linux cli command wcpcpy
- 282: Linux cli command Image_ExifTool_MacOSpm
- 283: Linux cli command Tk_Entrypm
- 284: Linux cli command Import_Intopm
- 285: Linux cli command NULLconst
- 286: Linux cli command Regexp_Common_zippm
- 287: Linux cli command wcscat
- 288: Linux cli command free
- 289: Linux cli command getnetgrent_r
- 290: Linux cli command Image_ExifTool_NikonCapturepm
- 291: Linux cli command Image_ExifTool_ICC_Profilepm
- 292: Linux cli command STAILQ_HEAD
- 293: Linux cli command Net_DBus_RemoteServicepm
- 294: Linux cli command uintmax_ttype
- 295: Linux cli command getnetbyname
- 296: Linux cli command nextafterf
- 297: Linux cli command pthread_rwlockattr_setkind_np
- 298: Linux cli command XML_DOM_PerlSAXpm
- 299: Linux cli command PA_WCHARconst
- 300: Linux cli command xdr_bool
- 301: Linux cli command getdelim
- 302: Linux cli command rewinddir
- 303: Linux cli command Xau
- 304: Linux cli command getgrent
- 305: Linux cli command Image_ExifTool_Otherpm
- 306: Linux cli command PA_STRINGconst
- 307: Linux cli command XdbeAllocateBackBufferName
- 308: Linux cli command XtRegisterExtensionSelector
- 309: Linux cli command tempnam
- 310: Linux cli command XtProcessUnlock
- 311: Linux cli command XtReleaseGC
- 312: Linux cli command fstatvfs
- 313: Linux cli command Tk_getOpenFilepm
- 314: Linux cli command uint32_ttype
- 315: Linux cli command Net_DNS_RR_GPOSpm
- 316: Linux cli command pthread_setschedparam
- 317: Linux cli command LWP_Debugpm
- 318: Linux cli command mq_notify
- 319: Linux cli command timespectype
- 320: Linux cli command URI_ldappm
- 321: Linux cli command mkostemp
- 322: Linux cli command Regexp_Common_CCpm
- 323: Linux cli command getdirentries
- 324: Linux cli command pcap_compilepcap
- 325: Linux cli command Net_DNS_Domainpm
- 326: Linux cli command htole16
- 327: Linux cli command pthread_attr_setstackaddr
- 328: Linux cli command Tk_gridpm
- 329: Linux cli command Net_Server_MultiTypepm
- 330: Linux cli command strncpy
- 331: Linux cli command Tk_Compoundpm
- 332: Linux cli command XtNew
- 333: Linux cli command Moose_Manual_Classespm
- 334: Linux cli command rexec_af
- 335: Linux cli command Tk_TListpm
- 336: Linux cli command Image_ExifTool_MIFFpm
- 337: Linux cli command zip_source_seek
- 338: Linux cli command zip_stat_init
- 339: Linux cli command getcwd
- 340: Linux cli command strxfrm
- 341: Linux cli command zip_error_init_with_code
- 342: Linux cli command fputc
- 343: Linux cli command Spreadsheet_ParseExcel_Utilitypm
- 344: Linux cli command siginterrupt
- 345: Linux cli command Sub_Namepm
- 346: Linux cli command pututline
- 347: Linux cli command getutxid
- 348: Linux cli command Regexp_Commonpm
- 349: Linux cli command nearbyint
- 350: Linux cli command Regexp_Common_balancedpm
- 351: Linux cli command Spreadsheet_ParseExcel_FmtJapan2pm
- 352: Linux cli command wcstombs
- 353: Linux cli command mq_getattr
- 354: Linux cli command xdr_int
- 355: Linux cli command __setfpucw
- 356: Linux cli command zip_error_set
- 357: Linux cli command Image_ExifTool_Pentaxpm
- 358: Linux cli command Moo_Rolepm
- 359: Linux cli command XtGetSelectionRequest
- 360: Linux cli command srand48_r
- 361: Linux cli command Moose_Objectpm
- 362: Linux cli command pcap_createpcap
- 363: Linux cli command pthread_attr_getinheritsched
- 364: Linux cli command getOpenFilepm
- 365: Linux cli command IO_All_HTTPpm
- 366: Linux cli command MIN
- 367: Linux cli command strtoll
- 368: Linux cli command pcap_findalldevspcap
- 369: Linux cli command Tk_IconListpm
- 370: Linux cli command uint64_ttype
- 371: Linux cli command XtGetClassExtension
- 372: Linux cli command zip_file_set_dostime
- 373: Linux cli command __ppc_set_ppr_med_high
- 374: Linux cli command nanl
- 375: Linux cli command Spreadsheet_ParseExcel_Fontpm
- 376: Linux cli command wcpncpy
- 377: Linux cli command XtAddConverter
- 378: Linux cli command XtGetSelectionValuesIncremental
- 379: Linux cli command fread
- 380: Linux cli command pthread_mutex_lock
- 381: Linux cli command SIMPLEQ_HEAD_INITIALIZER
- 382: Linux cli command XtRemoveRawEventHandler
- 383: Linux cli command NetSNMP_default_storepm
- 384: Linux cli command XtSetWarningMsgHandler
- 385: Linux cli command IO_All_STDIOpm
- 386: Linux cli command snprintf
- 387: Linux cli command uintptr_ttype
- 388: Linux cli command procps
- 389: Linux cli command strndupa
- 390: Linux cli command ttyslot
- 391: Linux cli command XML_Parser_Style_Streampm
- 392: Linux cli command metaclasspm
- 393: Linux cli command updwtmp
- 394: Linux cli command XtFindFile
- 395: Linux cli command ynf
- 396: Linux cli command stpncpy
- 397: Linux cli command hypotf
- 398: Linux cli command pthread_mutexattr_getkind_np
- 399: Linux cli command undocumented
- 400: Linux cli command Image_ExifTool_Sigmapm
- 401: Linux cli command nanf
- 402: Linux cli command isdigit_l
- 403: Linux cli command Moose_Exceptionpm
- 404: Linux cli command xdr_pmaplist
- 405: Linux cli command HTML_Tagsetpm
- 406: Linux cli command Net_Server_Log_Sys_Syslogpm
- 407: Linux cli command Image_ExifTool_FITSpm
- 408: Linux cli command URI_icappm
- 409: Linux cli command XtCloseDisplay
- 410: Linux cli command Font_AFMpm
- 411: Linux cli command LIST_INSERT_AFTER
- 412: Linux cli command Net_DNS_RR_MBpm
- 413: Linux cli command stpcpy
- 414: Linux cli command Regexp_Common_commentpm
- 415: Linux cli command getttynam
- 416: Linux cli command htole32
- 417: Linux cli command key_setsecret
- 418: Linux cli command malloc_info
- 419: Linux cli command readdir_r
- 420: Linux cli command puts
- 421: Linux cli command iconv_close
- 422: Linux cli command Image_ExifTool_PLUSpm
- 423: Linux cli command OLE_Storage_Litepm
- 424: Linux cli command Spreadsheet_WriteExcel_Formatpm
- 425: Linux cli command TAILQ_FOREACH_REVERSE
- 426: Linux cli command Text_CSVpm
- 427: Linux cli command XtQueryGeometry
- 428: Linux cli command LIST_FOREACH
- 429: Linux cli command Net_DBus_Tutorial_ExportingObjectspm
- 430: Linux cli command pthread_sigmask
- 431: Linux cli command Image_ExifTool_PSPpm
- 432: Linux cli command mbrlen
- 433: Linux cli command wcscspn
- 434: Linux cli command Moose_Manual_Typespm
- 435: Linux cli command Moose_Meta_Attribute_Native_Trait_Counterpm
- 436: Linux cli command XML_DOM_CharacterDatapm
- 437: Linux cli command __fbufsize
- 438: Linux cli command gnu_get_libc_version
- 439: Linux cli command Tk_Tilerpm
- 440: Linux cli command JSON_XS_Booleanpm
- 441: Linux cli command realpath
- 442: Linux cli command NetSNMP_TrapReceiverpm
- 443: Linux cli command Regexp_Common_linguapm
- 444: Linux cli command svctcp_create
- 445: Linux cli command Tk_Scrollbarpm
- 446: Linux cli command vprintf
- 447: Linux cli command XtCreateWidget
- 448: Linux cli command pthread_detach
- 449: Linux cli command malloc_usable_size
- 450: Linux cli command zip_open_from_source
- 451: Linux cli command Image_ExifTool_CanonVRDpm
- 452: Linux cli command HTML_Form_ListInputpm
- 453: Linux cli command IO_Stringypm
- 454: Linux cli command JSON_backportPPpm
- 455: Linux cli command XtGrabButton
- 456: Linux cli command Image_ExifTool_EXEpm
- 457: Linux cli command mblen
- 458: Linux cli command nl_langinfo
- 459: Linux cli command svcerr_weakauth
- 460: Linux cli command fnmatcham
- 461: Linux cli command Moose_Manualpm
- 462: Linux cli command Net_DBus_Tutorialpm
- 463: Linux cli command POD2_JA_MIME_Charsetpm
- 464: Linux cli command roundup
- 465: Linux cli command zip_source_begin_write_cloning
- 466: Linux cli command mq_receive
- 467: Linux cli command fputs
- 468: Linux cli command psignal
- 469: Linux cli command Mail_Headerpm
- 470: Linux cli command XtScreenOfObject
- 471: Linux cli command SIMPLEQ_INSERT_AFTER
- 472: Linux cli command jnl
- 473: Linux cli command verrx
- 474: Linux cli command Image_ExifTool_Samsungpm
- 475: Linux cli command Moose_Meta_Methodpm
- 476: Linux cli command Regexp_Common_URI_newspm
- 477: Linux cli command sem_wait
- 478: Linux cli command zip_close
- 479: Linux cli command zip_file_extra_field_set
- 480: Linux cli command PA_FLOATconst
- 481: Linux cli command getutid
- 482: Linux cli command llroundl
- 483: Linux cli command setfsent
- 484: Linux cli command timerclear
- 485: Linux cli command XML_DOMpm
- 486: Linux cli command inet
- 487: Linux cli command sigpause
- 488: Linux cli command Net_DNS_SEC_ECDSApm
- 489: Linux cli command STAILQ_NEXT
- 490: Linux cli command sigqueue
- 491: Linux cli command HUGE_VALL
- 492: Linux cli command rcmd_af
- 493: Linux cli command Net_DNS_RR_EUI64pm
- 494: Linux cli command XtSetKeyTranslator
- 495: Linux cli command XtWindowToWidget
- 496: Linux cli command zip_source_tell_write
- 497: Linux cli command Image_ExifTool_Panasonicpm
- 498: Linux cli command SIMPLEQ_EMPTY
- 499: Linux cli command Net_DNS_RR_SMIMEApm
- 500: Linux cli command ordchram
- 501: Linux cli command malloc_get_state
- 502: Linux cli command pcap_freecodepcap
- 503: Linux cli command strchr
- 504: Linux cli command setttyent
- 505: Linux cli command Tk_tixWmpm
- 506: Linux cli command XStringpm
- 507: Linux cli command XtGetSelectionValues
- 508: Linux cli command Image_ExifTool_DPXpm
- 509: Linux cli command pcap_is_swappedpcap
- 510: Linux cli command Time_Zonepm
- 511: Linux cli command Tk_DItempm
- 512: Linux cli command usleep
- 513: Linux cli command Moose_Meta_Attribute_Native_Trait_Numberpm
- 514: Linux cli command Moose_Meta_TypeConstraint_Enumpm
- 515: Linux cli command SIMPLEQ_INSERT_HEAD
- 516: Linux cli command pthread_setcanceltype
- 517: Linux cli command timegm
- 518: Linux cli command XtHasCallbacks
- 519: Linux cli command XtUnmanageChildren
- 520: Linux cli command XtWarning
- 521: Linux cli command Tk_selectionpm
- 522: Linux cli command HUGE_VAL
- 523: Linux cli command Image_ExifTool_Audiblepm
- 524: Linux cli command Tk_IOpm
- 525: Linux cli command URI_Escapepm
- 526: Linux cli command X11_Protocol_Connection_FileHandlepm
- 527: Linux cli command Image_ExifTool_Motorolapm
- 528: Linux cli command LIST_INIT
- 529: Linux cli command if_indextoname
- 530: Linux cli command Tk_JPEGpm
- 531: Linux cli command toupper_l
- 532: Linux cli command XShmPutImage
- 533: Linux cli command NetPacket_UDPpm
- 534: Linux cli command llround
- 535: Linux cli command Moose_Cookbook_Basics_HTTP_SubtypesAndCoercionpm
- 536: Linux cli command XtSetMappedWhenManaged
- 537: Linux cli command XtAppNextEvent
- 538: Linux cli command xdr_reference
- 539: Linux cli command logout
- 540: Linux cli command Net_DNS_RR_AAAApm
- 541: Linux cli command pthread_mutex_destroy
- 542: Linux cli command STAILQ_REMOVE_HEAD
- 543: Linux cli command strspn
- 544: Linux cli command Image_ExifTool_Opuspm
- 545: Linux cli command IO_Scalarpm
- 546: Linux cli command lroundl
- 547: Linux cli command svcerr_progvers
- 548: Linux cli command XtNextEvent
- 549: Linux cli command XtIsOverrideShell
- 550: Linux cli command XtWindow
- 551: Linux cli command roundl
- 552: Linux cli command Tk_formpm
- 553: Linux cli command isgreater
- 554: Linux cli command zip_fopen
- 555: Linux cli command inet_net_ntop
- 556: Linux cli command IO_Linespm
- 557: Linux cli command Moose_Meta_Instancepm
- 558: Linux cli command zip_stat_index
- 559: Linux cli command fmax
- 560: Linux cli command IO_All_Dirpm
- 561: Linux cli command strtol
- 562: Linux cli command PA_LASTconst
- 563: Linux cli command wctrans
- 564: Linux cli command getlogin
- 565: Linux cli command timelocal
- 566: Linux cli command Image_ExifTool_WritePNGpm
- 567: Linux cli command pthread_setaffinity_np
- 568: Linux cli command suseconds_ttype
- 569: Linux cli command in_addrtype
- 570: Linux cli command opendir
- 571: Linux cli command getsubopt
- 572: Linux cli command inet_aton
- 573: Linux cli command remquo
- 574: Linux cli command svc_freeargs
- 575: Linux cli command Image_ExifTool_Lang_kopm
- 576: Linux cli command Image_ExifTool_CBORpm
- 577: Linux cli command iswalpha
- 578: Linux cli command Spreadsheet_ParseExcel_FmtDefaultpm
- 579: Linux cli command vwprintf
- 580: Linux cli command __fpending
- 581: Linux cli command strfromd
- 582: Linux cli command Tk_Fontpm
- 583: Linux cli command xdr_callhdr
- 584: Linux cli command hcreate_r
- 585: Linux cli command XtAddCallback
- 586: Linux cli command getnetgrent
- 587: Linux cli command Image_ExifTool_AESpm
- 588: Linux cli command ntp_gettimex
- 589: Linux cli command flockfile
- 590: Linux cli command Image_ExifTool_Lang_svpm
- 591: Linux cli command getutxline
- 592: Linux cli command iscntrl
- 593: Linux cli command l64a
- 594: Linux cli command isnanl
- 595: Linux cli command vsnprintf
- 596: Linux cli command Image_ExifTool_Fontpm
- 597: Linux cli command XtRemoveEventTypeHandler
- 598: Linux cli command Image_ExifTool_Casiopm
- 599: Linux cli command XML_XPathEngine_Numberpm
- 600: Linux cli command pcap_filenopcap
- 601: Linux cli command sigsetmask
- 602: Linux cli command inet_network
- 603: Linux cli command XtIsSubclass
- 604: Linux cli command LWP_Protocol_httpspm
- 605: Linux cli command nextupf
- 606: Linux cli command pthread_mutexattr_setkind_np
- 607: Linux cli command vswprintf
- 608: Linux cli command XtDestroyApplicationContext
- 609: Linux cli command IPC_System_Simplepm
- 610: Linux cli command LIST_FIRST
- 611: Linux cli command XtScreen
- 612: Linux cli command Image_ExifTool_Parrotpm
- 613: Linux cli command S_ISDIR
- 614: Linux cli command XtSetLanguageProc
- 615: Linux cli command hash
- 616: Linux cli command memccpy
- 617: Linux cli command strpbrk
- 618: Linux cli command XtGetKeyboardFocusWidget
- 619: Linux cli command zip_unchange_all
- 620: Linux cli command __ppc_get_timebase
- 621: Linux cli command XML_SAX2Perlpm
- 622: Linux cli command UUIDpm
- 623: Linux cli command xcrypt
- 624: Linux cli command initgroups
- 625: Linux cli command zip_source_buffer_create
- 626: Linux cli command llrintf
- 627: Linux cli command major
- 628: Linux cli command pthread_once
- 629: Linux cli command Spreadsheet_ParseExcel_Cellpm
- 630: Linux cli command Tk_Listboxpm
- 631: Linux cli command XtParseAcceleratorTable
- 632: Linux cli command Image_ExifTool_MPFpm
- 633: Linux cli command iswctype
- 634: Linux cli command pcap_closepcap
- 635: Linux cli command pcap_major_versionpcap
- 636: Linux cli command LWP_RobotUApm
- 637: Linux cli command ftime
- 638: Linux cli command Moose_Meta_Method_Metapm
- 639: Linux cli command HTTP_Statuspm
- 640: Linux cli command Image_ExifTool_MRCpm
- 641: Linux cli command rindex
- 642: Linux cli command XtVaOpenApplication
- 643: Linux cli command Net_DBus_Binding_Watchpm
- 644: Linux cli command Image_ExifTool_WritePostScriptpm
- 645: Linux cli command Tk_FBoxpm
- 646: Linux cli command gamma
- 647: Linux cli command regex
- 648: Linux cli command rwarrayam
- 649: Linux cli command nexttowardf
- 650: Linux cli command Image_ExifTool_Minoltapm
- 651: Linux cli command memalign
- 652: Linux cli command on_exit
- 653: Linux cli command TAILQ_EMPTY
- 654: Linux cli command zip_source_begin_write
- 655: Linux cli command lwpcookpm
- 656: Linux cli command ntohs
- 657: Linux cli command XtNewString
- 658: Linux cli command __ppc_set_ppr_very_low
- 659: Linux cli command xdrrec_skiprecord
- 660: Linux cli command zip_file_extra_field_delete
- 661: Linux cli command NetSNMP_agent_default_storepm
- 662: Linux cli command XtGetActionList
- 663: Linux cli command LWP_Protocol_socks4pm
- 664: Linux cli command nrand48
- 665: Linux cli command Tk_placepm
- 666: Linux cli command XtCallConverter
- 667: Linux cli command logl
- 668: Linux cli command Net_DNS_RR_AMTRELAYpm
- 669: Linux cli command libxml
- 670: Linux cli command sigset
- 671: Linux cli command strfroml
- 672: Linux cli command putc
- 673: Linux cli command Spreadsheet_ParseExcel_Formatpm
- 674: Linux cli command wctob
- 675: Linux cli command y0f
- 676: Linux cli command pcap_get_selectable_fdpcap
- 677: Linux cli command XtAppError
- 678: Linux cli command IO_HTMLpm
- 679: Linux cli command JSON_XSpm
- 680: Linux cli command XML_PatAct_MatchNamepm
- 681: Linux cli command XtGetApplicationResources
- 682: Linux cli command isblank_l
- 683: Linux cli command pthread_equal
- 684: Linux cli command XtMainLoop
- 685: Linux cli command tfind
- 686: Linux cli command gammaf
- 687: Linux cli command pcap_dispatchpcap
- 688: Linux cli command isgraph_l
- 689: Linux cli command key_gendes
- 690: Linux cli command pcap_lookupdevpcap
- 691: Linux cli command XtGetDisplays
- 692: Linux cli command lseek64
- 693: Linux cli command vscanf
- 694: Linux cli command getgrent_r
- 695: Linux cli command Image_ExifTool_Geotagpm
- 696: Linux cli command mbtowc
- 697: Linux cli command sqrt
- 698: Linux cli command XtGetSelectionParameters
- 699: Linux cli command Net_DNS_Resolverpm
- 700: Linux cli command getspent
- 701: Linux cli command hstrerror
- 702: Linux cli command Image_ExifTool_Lang_skpm
- 703: Linux cli command Image_ExifTool_Palmpm
- 704: Linux cli command Pod_Parserpm
- 705: Linux cli command setstate
- 706: Linux cli command sockaddr_untype
- 707: Linux cli command XML_Handler_BuildDOMpm
- 708: Linux cli command __realloc_hook
- 709: Linux cli command NetSNMP_ASNpm
- 710: Linux cli command XtSetSensitive
- 711: Linux cli command Moose_Cookbook_Basics_Immutablepm
- 712: Linux cli command Moose_Manual_Deltapm
- 713: Linux cli command Net_DNS_RR_L32pm
- 714: Linux cli command Net_Server_Daemonizepm
- 715: Linux cli command XtAppSetSelectionTimeout
- 716: Linux cli command XtAllocateGC
- 717: Linux cli command zip_ftell
- 718: Linux cli command lgammal
- 719: Linux cli command printf.hhead
- 720: Linux cli command HTML_FormatTextpm
- 721: Linux cli command XML_PatAct_Amsterdampm
- 722: Linux cli command XtAugmentTranslations
- 723: Linux cli command XtPopdown
- 724: Linux cli command fputs_unlocked
- 725: Linux cli command Image_ExifTool_Stimpm
- 726: Linux cli command SLIST_FIRST
- 727: Linux cli command Image_ExifTool_Photoshoppm
- 728: Linux cli command Net_DNS_RR_AFSDBpm
- 729: Linux cli command Net_DBus_Binding_Buspm
- 730: Linux cli command Net_DNS_RR_RPpm
- 731: Linux cli command zip_source_stat
- 732: Linux cli command fmodf
- 733: Linux cli command mallinfo
- 734: Linux cli command minor
- 735: Linux cli command wcsncpy
- 736: Linux cli command HTML_Entitiespm
- 737: Linux cli command LWP_Simplepm
- 738: Linux cli command mallopt
- 739: Linux cli command mkfifo
- 740: Linux cli command nftw
- 741: Linux cli command reallocarray
- 742: Linux cli command Tk_Xrmpm
- 743: Linux cli command xprt_register
- 744: Linux cli command XShapeOffsetShape
- 745: Linux cli command NetSNMP_agentpm
- 746: Linux cli command Image_ExifToolpm
- 747: Linux cli command srand48
- 748: Linux cli command TAILQ_INSERT_AFTER
- 749: Linux cli command iovectype
- 750: Linux cli command list
- 751: Linux cli command res_nquerydomain
- 752: Linux cli command XtGetConstraintResourceList
- 753: Linux cli command YAML_Tinypm
- 754: Linux cli command strcpy
- 755: Linux cli command XtAppLock
- 756: Linux cli command zip_compression_method_supported
- 757: Linux cli command Image_ExifTool_FLIRpm
- 758: Linux cli command makedev
- 759: Linux cli command XtOpenDisplay
- 760: Linux cli command xdr_char
- 761: Linux cli command fmaf
- 762: Linux cli command pcap_snapshotpcap
- 763: Linux cli command TAILQ_INSERT_HEAD
- 764: Linux cli command truncl
- 765: Linux cli command XtConfigureWidget
- 766: Linux cli command xdr_u_short
- 767: Linux cli command Image_ExifTool_Lang_rupm
- 768: Linux cli command Image_ExifTool_Nintendopm
- 769: Linux cli command Moose_Manual_MooseXpm
- 770: Linux cli command Image_ExifTool_DNGpm
- 771: Linux cli command open_memstream
- 772: Linux cli command timersub
- 773: Linux cli command Tk_Labelpm
- 774: Linux cli command Tk_exitpm
- 775: Linux cli command zip_strerror
- 776: Linux cli command ntohl
- 777: Linux cli command XtTranslateKeycode
- 778: Linux cli command int32_ttype
- 779: Linux cli command fmin
- 780: Linux cli command pthread_mutexattr_settype
- 781: Linux cli command XtIsConstraint
- 782: Linux cli command sigvaltype
- 783: Linux cli command pthread_attr_getscope
- 784: Linux cli command URI_geopm
- 785: Linux cli command getservbyname
- 786: Linux cli command sethostid
- 787: Linux cli command XtDisplay
- 788: Linux cli command HTTP_Requestpm
- 789: Linux cli command Mail_Field_Datepm
- 790: Linux cli command oopm
- 791: Linux cli command pthread_attr_setstack
- 792: Linux cli command setprotoent
- 793: Linux cli command makecontext
- 794: Linux cli command pcap_open_offlinepcap
- 795: Linux cli command File_MimeInfo_Magicpm
- 796: Linux cli command pthread_attr_setguardsize
- 797: Linux cli command vsyslog
- 798: Linux cli command ungetwc
- 799: Linux cli command fopencookie
- 800: Linux cli command IO_Socket_SSL_PublicSuffixpm
- 801: Linux cli command XtRegisterCaseConverter
- 802: Linux cli command XtDisplayToApplicationContext
- 803: Linux cli command XtGetMultiClickTime
- 804: Linux cli command __ppc_set_ppr_med_low
- 805: Linux cli command mrand48
- 806: Linux cli command XdbeDeallocateBackBufferName
- 807: Linux cli command zip_source_win32handle
- 808: Linux cli command HTML_Parserpm
- 809: Linux cli command xdr_float
- 810: Linux cli command j1l
- 811: Linux cli command nl_langinfo_l
- 812: Linux cli command XtAddWorkProc
- 813: Linux cli command File_Find_Rule_Extendingpm
- 814: Linux cli command log1p
- 815: Linux cli command setmntent
- 816: Linux cli command URI_icapspm
- 817: Linux cli command getdate
- 818: Linux cli command va_copy
- 819: Linux cli command __ppc_set_ppr_med
- 820: Linux cli command libmagic
- 821: Linux cli command pcap_can_set_rfmonpcap
- 822: Linux cli command PA_FLAG_LONG_LONGconst
- 823: Linux cli command Tk_WinPhotopm
- 824: Linux cli command ynl
- 825: Linux cli command pthread_condattr_destroy
- 826: Linux cli command Tk_TextUndopm
- 827: Linux cli command zip_replace
- 828: Linux cli command gethostid
- 829: Linux cli command XML_Parser_Expatpm
- 830: Linux cli command pthread_setschedprio
- 831: Linux cli command Tk_Balloonpm
- 832: Linux cli command XtDisownSelection
- 833: Linux cli command mempcpy
- 834: Linux cli command XtInitialize
- 835: Linux cli command Net_DNS_SEC_EdDSApm
- 836: Linux cli command Text_LineFoldpm
- 837: Linux cli command XmbufChangeWindowAttributes
- 838: Linux cli command isupper_l
- 839: Linux cli command Net_DNS_RR_APLpm
- 840: Linux cli command svcerr_noproc
- 841: Linux cli command Tk_widgetspm
- 842: Linux cli command XtAddActions
- 843: Linux cli command Moose_Meta_Role_Method_Conflictingpm
- 844: Linux cli command XtIsVendorShell
- 845: Linux cli command Image_ExifTool_Lang_cspm
- 846: Linux cli command XtCreateApplicationShell
- 847: Linux cli command XtWarningMsg
- 848: Linux cli command fwrite
- 849: Linux cli command Text_Iconvpm
- 850: Linux cli command unlockpt
- 851: Linux cli command vsprintf
- 852: Linux cli command IO_All_Stringpm
- 853: Linux cli command XeviGetVisualInfo
- 854: Linux cli command Image_ExifTool_Vorbispm
- 855: Linux cli command Tk_Scalepm
- 856: Linux cli command XShapeQueryExtension
- 857: Linux cli command LIST_EMPTY
- 858: Linux cli command Mail_Mailerpm
- 859: Linux cli command Net_DNS_RR_NIDpm
- 860: Linux cli command sockaddrtype
- 861: Linux cli command XtGetResourceList
- 862: Linux cli command lutimes
- 863: Linux cli command XtGetKeysymTable
- 864: Linux cli command Image_ExifTool_Microsoftpm
- 865: Linux cli command Mail_Internetpm
- 866: Linux cli command pthread_getconcurrency
- 867: Linux cli command strerrorname_np
- 868: Linux cli command iswblank
- 869: Linux cli command Moose_Meta_Object_Traitpm
- 870: Linux cli command Net_DBus_Dumperpm
- 871: Linux cli command register_printf_modifier
- 872: Linux cli command sysexits.hhead
- 873: Linux cli command lrintf
- 874: Linux cli command mbsnrtowcs
- 875: Linux cli command iswprint
- 876: Linux cli command isinff
- 877: Linux cli command XtIsTransientShell
- 878: Linux cli command Moose_Cookbook_Roles_Comparable_CodeReusepm
- 879: Linux cli command Tk_Wmpm
- 880: Linux cli command XtAppAddActionHook
- 881: Linux cli command log1pf
- 882: Linux cli command pcap_statustostrpcap
- 883: Linux cli command pthread_attr_setaffinity_np
- 884: Linux cli command xdr_u_int
- 885: Linux cli command lcong48_r
- 886: Linux cli command fputwc
- 887: Linux cli command Spreadsheet_WriteExcel_Bigpm
- 888: Linux cli command TAILQ_LAST
- 889: Linux cli command pcap_dump_ftellpcap
- 890: Linux cli command SLIST_INSERT_AFTER
- 891: Linux cli command sem_open
- 892: Linux cli command Sub_Exporter_Progressivepm
- 893: Linux cli command zip_get_name
- 894: Linux cli command isfinite
- 895: Linux cli command openlog
- 896: Linux cli command xdr
- 897: Linux cli command register_printf_type
- 898: Linux cli command strncat
- 899: Linux cli command XML_DOM_XMLDeclpm
- 900: Linux cli command sys_siglist
- 901: Linux cli command XtStringConversionWarning
- 902: Linux cli command gcvt
- 903: Linux cli command Net_DNS_RR_HINFOpm
- 904: Linux cli command wmemcpy
- 905: Linux cli command imaxdiv
- 906: Linux cli command IO_InnerFilepm
- 907: Linux cli command Spiffypm
- 908: Linux cli command zip_fseek
- 909: Linux cli command IO_Allpm
- 910: Linux cli command strftime_l
- 911: Linux cli command zip_source_free
- 912: Linux cli command XtDisplayInitialize
- 913: Linux cli command getfsfile
- 914: Linux cli command scalb
- 915: Linux cli command XtAppSetWarningHandler
- 916: Linux cli command XtDisplayStringConversionWarning
- 917: Linux cli command zip_get_num_entries
- 918: Linux cli command __memalign_hook
- 919: Linux cli command File_IconThemepm
- 920: Linux cli command nrand48_r
- 921: Linux cli command wcrtomb
- 922: Linux cli command XmbufGetWindowAttributes
- 923: Linux cli command Image_ExifTool_Lang_en_gbpm
- 924: Linux cli command memmove
- 925: Linux cli command getloadavg
- 926: Linux cli command Net_DNS_RR_PTRpm
- 927: Linux cli command pcap_sendpacketpcap
- 928: Linux cli command XeviQueryExtension
- 929: Linux cli command get_nprocs_conf
- 930: Linux cli command HTML_Formatterpm
- 931: Linux cli command Image_ExifTool_Applepm
- 932: Linux cli command sinhl
- 933: Linux cli command strtoul
- 934: Linux cli command Tk_Canvaspm
- 935: Linux cli command Image_ExifTool_GIMPpm
- 936: Linux cli command zlib
- 937: Linux cli command Pod_InputObjectspm
- 938: Linux cli command strfmon_l
- 939: Linux cli command Tk_demos_widget_lib_slidepm
- 940: Linux cli command pcap_set_protocol_linuxpcap
- 941: Linux cli command XtMergeArgLists
- 942: Linux cli command pthread_attr_destroy
- 943: Linux cli command unlocked_stdio
- 944: Linux cli command Net_DBus_Errorpm
- 945: Linux cli command qecvt_r
- 946: Linux cli command svc_sendreply
- 947: Linux cli command XtToolkitThreadInitialize
- 948: Linux cli command zip_get_num_files
- 949: Linux cli command htonl
- 950: Linux cli command IO_All_Filepm
- 951: Linux cli command XtFree
- 952: Linux cli command getrpcbyname
- 953: Linux cli command Net_DNS_RR_SIGpm
- 954: Linux cli command sem_timedwait
- 955: Linux cli command Image_ExifTool_Nikonpm
- 956: Linux cli command HTML_Template_FAQpm
- 957: Linux cli command Image_ExifTool_ASFpm
- 958: Linux cli command iscntrl_l
- 959: Linux cli command Tk_ConfigSpecspm
- 960: Linux cli command wcsrtombs
- 961: Linux cli command LWP_MemberMixinpm
- 962: Linux cli command xdr_vector
- 963: Linux cli command wcscpy
- 964: Linux cli command fts_read
- 965: Linux cli command pmap_getport
- 966: Linux cli command sigorset
- 967: Linux cli command Net_DNS_RR_SRVpm
- 968: Linux cli command PA_WSTRINGconst
- 969: Linux cli command Image_ExifTool_PhotoCDpm
- 970: Linux cli command j0f
- 971: Linux cli command Net_SSLpm
- 972: Linux cli command putwc
- 973: Linux cli command XtUngrabPointer
- 974: Linux cli command zip_set_default_password
- 975: Linux cli command pthread_attr_setsigmask_np
- 976: Linux cli command XShmPixmapFormat
- 977: Linux cli command Net_DNS_RR_MGpm
- 978: Linux cli command key_decryptsession
- 979: Linux cli command XtSetSubvalues
- 980: Linux cli command getspnam
- 981: Linux cli command __fsetlocking
- 982: Linux cli command XtMakeGeometryRequest
- 983: Linux cli command Moose_Cookbook_Basics_Document_AugmentAndInnerpm
- 984: Linux cli command XauFileName
- 985: Linux cli command XmbufChangeBufferAttributes
- 986: Linux cli command zip_file_get_external_attributes
- 987: Linux cli command XtAppAddWorkProc
- 988: Linux cli command ldiv
- 989: Linux cli command lio_listio
- 990: Linux cli command URI_datapm
- 991: Linux cli command qfcvt
- 992: Linux cli command SLIST_NEXT
- 993: Linux cli command Mail_Sendpm
- 994: Linux cli command Spreadsheet_WriteExcel_Examplespm
- 995: Linux cli command vtimes
- 996: Linux cli command in_port_ttype
- 997: Linux cli command inet_net_pton
- 998: Linux cli command Net_SSH2_Dirpm
- 999: Linux cli command pcap_dumppcap
- 1000: Linux cli command xdr_opaque_auth
- 1001: Linux cli command getrpcbyname_r
- 1002: Linux cli command SLIST_HEAD_INITIALIZER
- 1003: Linux cli command getpwuid_r
- 1004: Linux cli command raise
- 1005: Linux cli command xdrstdio_create
- 1006: Linux cli command XML_DOM_ProcessingInstructionpm
- 1007: Linux cli command XtAppSetTypeConverter
- 1008: Linux cli command isspace_l
- 1009: Linux cli command XtSetErrorHandler
- 1010: Linux cli command XtSetTypeConverter
- 1011: Linux cli command LIST_REMOVE
- 1012: Linux cli command XtAddEventHandler
- 1013: Linux cli command __flbf
- 1014: Linux cli command HTTP_Cookiespm
- 1015: Linux cli command sigwait
- 1016: Linux cli command Image_ExifTool_MPEGpm
- 1017: Linux cli command iswdigit
- 1018: Linux cli command XML_XPathEngine_Literalpm
- 1019: Linux cli command MenuPopup
- 1020: Linux cli command XtSendSelectionRequest
- 1021: Linux cli command tcdrain
- 1022: Linux cli command XML_DOM_CDATASectionpm
- 1023: Linux cli command Image_ExifTool_BMPpm
- 1024: Linux cli command queue
- 1025: Linux cli command wcsncat
- 1026: Linux cli command Moose_Meta_Mixin_AttributeCorepm
- 1027: Linux cli command NetPacketpm
- 1028: Linux cli command pthread_cleanup_push
- 1029: Linux cli command xprt_unregister
- 1030: Linux cli command ilogbf
- 1031: Linux cli command XML_DOM_Entitypm
- 1032: Linux cli command Image_ExifTool_MOIpm
- 1033: Linux cli command Moose_Meta_Role_Application_ToRolepm
- 1034: Linux cli command HTML_Form_KeygenInputpm
- 1035: Linux cli command Tk_TixGridpm
- 1036: Linux cli command NetPacket_ICMPpm
- 1037: Linux cli command re_comp
- 1038: Linux cli command Tk_MsgBoxpm
- 1039: Linux cli command zip_source_commit_write
- 1040: Linux cli command islower_l
- 1041: Linux cli command IO_All_HTTPSpm
- 1042: Linux cli command mktime
- 1043: Linux cli command wprintf
- 1044: Linux cli command _Generic
- 1045: Linux cli command Net_DNS_RR_MRpm
- 1046: Linux cli command Tk_Menubuttonpm
- 1047: Linux cli command XtGetErrorDatabase
- 1048: Linux cli command memfrob
- 1049: Linux cli command URI_QueryParampm
- 1050: Linux cli command stattype
- 1051: Linux cli command XtAppReleaseCacheRefs
- 1052: Linux cli command Parse_RecDescentpm
- 1053: Linux cli command putwc_unlocked
- 1054: Linux cli command Image_ExifTool_Qualcommpm
- 1055: Linux cli command putspent
- 1056: Linux cli command Tk_Animationpm
- 1057: Linux cli command XtCreateManagedWidget
- 1058: Linux cli command Image_ExifTool_Sonypm
- 1059: Linux cli command pcap_tstamp_type_val_to_namepcap
- 1060: Linux cli command tanl
- 1061: Linux cli command getc_unlocked
- 1062: Linux cli command tcgetsid
- 1063: Linux cli command xdr_union
- 1064: Linux cli command gethostbyname_r
- 1065: Linux cli command XtGetSubresources
- 1066: Linux cli command IO_Socket_SSL_Utilspm
- 1067: Linux cli command sleep
- 1068: Linux cli command termios
- 1069: Linux cli command sem_close
- 1070: Linux cli command Spreadsheet_WriteExcel_Chart_Barpm
- 1071: Linux cli command getifaddrs
- 1072: Linux cli command pthread_mutexattr_getrobust_np
- 1073: Linux cli command xdr_getpos
- 1074: Linux cli command __after_morecore_hook
- 1075: Linux cli command pmap_unset
- 1076: Linux cli command Tie_Watchpm
- 1077: Linux cli command ptrdiff_ttype
- 1078: Linux cli command tsearch
- 1079: Linux cli command fputwc_unlocked
- 1080: Linux cli command Net_DNS_RR_MINFOpm
- 1081: Linux cli command NetPacket_ARPpm
- 1082: Linux cli command setvbuf
- 1083: Linux cli command jnf
- 1084: Linux cli command memmem
- 1085: Linux cli command Tk_Imagepm
- 1086: Linux cli command Image_ExifTool_ZIPpm
- 1087: Linux cli command strstr
- 1088: Linux cli command Tk_megapm
- 1089: Linux cli command XtUnmanageChild
- 1090: Linux cli command mprobe
- 1091: Linux cli command posix_openpt
- 1092: Linux cli command ptsname_r
- 1093: Linux cli command hdestroy_r
- 1094: Linux cli command Net_DNS_RR_HIPpm
- 1095: Linux cli command getnameinfo
- 1096: Linux cli command Image_ExifTool_WritePDFpm
- 1097: Linux cli command Net_SSLeay_Handlepm
- 1098: Linux cli command pthread_mutexattr_getrobust
- 1099: Linux cli command wcsdup
- 1100: Linux cli command XML_XPathEnginepm
- 1101: Linux cli command zip_rename
- 1102: Linux cli command group_member
- 1103: Linux cli command off_ttype
- 1104: Linux cli command printf_infotype
- 1105: Linux cli command sqrtl
- 1106: Linux cli command XdbeEndIdiom
- 1107: Linux cli command ftell
- 1108: Linux cli command getutline_r
- 1109: Linux cli command XtAppGetErrorDatabaseText
- 1110: Linux cli command nextdownl
- 1111: Linux cli command pcap_set_promiscpcap
- 1112: Linux cli command XtGetSelectionTimeout
- 1113: Linux cli command HTML_LinkExtractorpm
- 1114: Linux cli command intro
- 1115: Linux cli command sched_getcpu
- 1116: Linux cli command isprint
- 1117: Linux cli command LWP_Protocolpm
- 1118: Linux cli command tzname
- 1119: Linux cli command res_send
- 1120: Linux cli command y0l
- 1121: Linux cli command _flushlbf
- 1122: Linux cli command Image_ExifTool_XMPStructpm
- 1123: Linux cli command pthread_kill
- 1124: Linux cli command sem_unlink
- 1125: Linux cli command strsep
- 1126: Linux cli command towupper_l
- 1127: Linux cli command Image_ExifTool_Lang_depm
- 1128: Linux cli command program_invocation_short_name
- 1129: Linux cli command readfileam
- 1130: Linux cli command setlogmask
- 1131: Linux cli command Tk_PNGpm
- 1132: Linux cli command hsearch_r
- 1133: Linux cli command fpathconf
- 1134: Linux cli command getnetbyaddr
- 1135: Linux cli command HTTP_DAVpm
- 1136: Linux cli command Text_CharWidthpm
- 1137: Linux cli command getlogin_r
- 1138: Linux cli command Moose_Meta_Role_Applicationpm
- 1139: Linux cli command HTTP_Messagepm
- 1140: Linux cli command Image_ExifTool_WritePhotoshoppm
- 1141: Linux cli command S_ISBLK
- 1142: Linux cli command pthread_mutex_consistent
- 1143: Linux cli command Image_ExifTool_GoPropm
- 1144: Linux cli command LIST_ENTRY
- 1145: Linux cli command IO_All_Temppm
- 1146: Linux cli command size_ttype
- 1147: Linux cli command getgrgid
- 1148: Linux cli command Image_ExifTool_Lang_espm
- 1149: Linux cli command llrint
- 1150: Linux cli command towctrans
- 1151: Linux cli command xdr_long
- 1152: Linux cli command ispunct_l
- 1153: Linux cli command Moose_Deprecatedpm
- 1154: Linux cli command XtPending
- 1155: Linux cli command Image_ExifTool_ICOpm
- 1156: Linux cli command Tk_CmdLinepm
- 1157: Linux cli command Net_DNS_RR_MXpm
- 1158: Linux cli command ZIP_SOURCE_GET_ARGS
- 1159: Linux cli command Image_ExifTool_Writerpm
- 1160: Linux cli command libnetlink
- 1161: Linux cli command Image_ExifTool_WriteRIFFpm
- 1162: Linux cli command lround
- 1163: Linux cli command Term_ReadLine_Gnupm
- 1164: Linux cli command SLIST_INSERT_HEAD
- 1165: Linux cli command getnetbyname_r
- 1166: Linux cli command lgammaf
- 1167: Linux cli command Net_DNS_RR_NSECpm
- 1168: Linux cli command XmbufQueryExtension
- 1169: Linux cli command XML_DOM_AttlistDeclpm
- 1170: Linux cli command Image_ExifTool_MISBpm
- 1171: Linux cli command Net_DBus_Binding_Serverpm
- 1172: Linux cli command rpmatch
- 1173: Linux cli command XShape
- 1174: Linux cli command Moose_Manual_Rolespm
- 1175: Linux cli command Unicode_Mappm
- 1176: Linux cli command zip_set_file_compression
- 1177: Linux cli command HTML_Form_ImageInputpm
- 1178: Linux cli command Moose_Cookbook_Extending_Mooseish_MooseSugarpm
- 1179: Linux cli command XtIsShell
- 1180: Linux cli command getusershell
- 1181: Linux cli command res_ninit
- 1182: Linux cli command XtAppAddBlockHook
- 1183: Linux cli command LWP_Authen_Ntlmpm
- 1184: Linux cli command Mail_Filterpm
- 1185: Linux cli command sincosf
- 1186: Linux cli command Spreadsheet_WriteExcel_Chart_Columnpm
- 1187: Linux cli command Tk_Tracepm
- 1188: Linux cli command XtChangeManagedSet
- 1189: Linux cli command j1
- 1190: Linux cli command Moose_Spec_Rolepm
- 1191: Linux cli command wordexp
- 1192: Linux cli command Image_ExifTool_WriteCanonRawpm
- 1193: Linux cli command Text_CSV_XSpm
- 1194: Linux cli command Net_DNS_FAQpm
- 1195: Linux cli command XML_PatAct_ActionTemplpm
- 1196: Linux cli command zip_error_fini
- 1197: Linux cli command zip_set_archive_flag
- 1198: Linux cli command pthread_attr_setscope
- 1199: Linux cli command Moose_Utilpm
- 1200: Linux cli command URIpm
- 1201: Linux cli command verr
- 1202: Linux cli command XdbeGetVisualInfo
- 1203: Linux cli command zip_error_get
- 1204: Linux cli command hypotl
- 1205: Linux cli command XML_DOM_Commentpm
- 1206: Linux cli command isnan
- 1207: Linux cli command Net_DNS_RR_TXTpm
- 1208: Linux cli command fts_set
- 1209: Linux cli command ilogb
- 1210: Linux cli command Image_ExifTool_HtmlDumppm
- 1211: Linux cli command X11_Protocol_Connection_UNIXSocketpm
- 1212: Linux cli command fputws_unlocked
- 1213: Linux cli command modf
- 1214: Linux cli command xdrrec_create
- 1215: Linux cli command mkstemp
- 1216: Linux cli command Net_DNS_RR_LOCpm
- 1217: Linux cli command res_mkquery
- 1218: Linux cli command resolver
- 1219: Linux cli command y1l
- 1220: Linux cli command get_phys_pages
- 1221: Linux cli command tolower
- 1222: Linux cli command getopt_long
- 1223: Linux cli command putchar_unlocked
- 1224: Linux cli command regex_ttype
- 1225: Linux cli command matherr
- 1226: Linux cli command nearbyintf
- 1227: Linux cli command sigandset
- 1228: Linux cli command HTML_Form_IgnoreInputpm
- 1229: Linux cli command getaliasbyname
- 1230: Linux cli command globfree
- 1231: Linux cli command wint_ttype
- 1232: Linux cli command XtRemoveEventHandler
- 1233: Linux cli command getservent
- 1234: Linux cli command XmbufDestroyBuffers
- 1235: Linux cli command Net_DNS_Textpm
- 1236: Linux cli command lfind
- 1237: Linux cli command Net_DBus_Exporterpm
- 1238: Linux cli command Image_ExifTool_FlashPixpm
- 1239: Linux cli command pthread_spin_lock
- 1240: Linux cli command Image_ExifTool_MIEpm
- 1241: Linux cli command XtAppInitialize
- 1242: Linux cli command Tk_Toplevelpm
- 1243: Linux cli command Tk_getSaveFilepm
- 1244: Linux cli command pthread_spin_trylock
- 1245: Linux cli command fma
- 1246: Linux cli command nextupl
- 1247: Linux cli command pthread_getschedparam
- 1248: Linux cli command Net_DBus_Tutorial_UsingObjectspm
- 1249: Linux cli command Image_ExifTool_DVpm
- 1250: Linux cli command S_ISSOCK
- 1251: Linux cli command pthread_mutexattr_setrobust
- 1252: Linux cli command SIMPLEQ_FOREACH
- 1253: Linux cli command Moose_Meta_Method_Overriddenpm
- 1254: Linux cli command rtnetlink
- 1255: Linux cli command scalbn
- 1256: Linux cli command IPC_Shareable_SharedMempm
- 1257: Linux cli command ptsname
- 1258: Linux cli command tmpfile
- 1259: Linux cli command vlimit
- 1260: Linux cli command zip_set_archive_comment
- 1261: Linux cli command oosepm
- 1262: Linux cli command XcupStoreColors
- 1263: Linux cli command xdrrec_eof
- 1264: Linux cli command zip_file_error_clear
- 1265: Linux cli command historyreadline
- 1266: Linux cli command XtInitializeWidgetClass
- 1267: Linux cli command LIST_HEAD_INITIALIZER
- 1268: Linux cli command Moose_Util_MetaRolepm
- 1269: Linux cli command sgetspent
- 1270: Linux cli command XML_DOM_Notationpm
- 1271: Linux cli command pcap_breaklooppcap
- 1272: Linux cli command XtSetKeyboardFocus
- 1273: Linux cli command gethostent_r
- 1274: Linux cli command pthread_condattr_init
- 1275: Linux cli command XauGetBestAuthByAddr
- 1276: Linux cli command Unicode_LineBreakpm
- 1277: Linux cli command XauGetAuthByAddr
- 1278: Linux cli command XtUnmapWidget
- 1279: Linux cli command rintf
- 1280: Linux cli command setaliasent
- 1281: Linux cli command Spreadsheet_WriteExcel_Chartpm
- 1282: Linux cli command freelocale
- 1283: Linux cli command sincosl
- 1284: Linux cli command zip_fdopen
- 1285: Linux cli command HTML_LinkExtorpm
- 1286: Linux cli command fwprintf
- 1287: Linux cli command XML_XPathEngine_Booleanpm
- 1288: Linux cli command SIMPLEQ_INIT
- 1289: Linux cli command fsetpos
- 1290: Linux cli command zip_fread
- 1291: Linux cli command floorf
- 1292: Linux cli command isinf
- 1293: Linux cli command Tk_demos_widget_lib_trace2pm
- 1294: Linux cli command XtLastTimestampProcessed
- 1295: Linux cli command fprintf
- 1296: Linux cli command remainderl
- 1297: Linux cli command XtAppWarningMsg
- 1298: Linux cli command mq_timedreceive
- 1299: Linux cli command Moose_Meta_Attributepm
- 1300: Linux cli command Tk_Panedwindowpm
- 1301: Linux cli command XtIsApplicationShell
- 1302: Linux cli command memchr
- 1303: Linux cli command XtProcessLock
- 1304: Linux cli command Moose_Cookbook_Meta_GlobRef_InstanceMetaclasspm
- 1305: Linux cli command SLIST_ENTRY
- 1306: Linux cli command XtCreateSelectionRequest
- 1307: Linux cli command h_errno
- 1308: Linux cli command Tk_X11Fontpm
- 1309: Linux cli command XtGrabKey
- 1310: Linux cli command Net_DNS_Resolver_MSWin32pm
- 1311: Linux cli command Package_Stash_XSpm
- 1312: Linux cli command Moose_Manual_MethodModifierspm
- 1313: Linux cli command Regexp_Common_SENpm
- 1314: Linux cli command setenv
- 1315: Linux cli command mq_send
- 1316: Linux cli command nearbyintl
- 1317: Linux cli command XtCancelSelectionRequest
- 1318: Linux cli command TIMESPEC_TO_TIMEVAL
- 1319: Linux cli command wcsrchr
- 1320: Linux cli command Net_DBus_Binding_Connectionpm
- 1321: Linux cli command SIMPLEQ_HEAD
- 1322: Linux cli command Tk_Eventlooppm
- 1323: Linux cli command XtGetSubvalues
- 1324: Linux cli command XtMalloc
- 1325: Linux cli command XtRemoveWorkProc
- 1326: Linux cli command floor
- 1327: Linux cli command iconv_open
- 1328: Linux cli command pcap_dump_filepcap
- 1329: Linux cli command svcerr_decode
- 1330: Linux cli command pthread_cond_destroy
- 1331: Linux cli command XML_DOM_DocumentTypepm
- 1332: Linux cli command HTML_Form_Inputpm
- 1333: Linux cli command inet_ntoa
- 1334: Linux cli command XtCallbackPopdown
- 1335: Linux cli command fts
- 1336: Linux cli command tanhl
- 1337: Linux cli command Tk_Menu_Itempm
- 1338: Linux cli command Net_Whois_IPpm
- 1339: Linux cli command STAILQ_INIT
- 1340: Linux cli command Net_Server_Proto_SSLEAYpm
- 1341: Linux cli command pcap_getnonblockpcap
- 1342: Linux cli command Tk_Internalspm
- 1343: Linux cli command hsearch
- 1344: Linux cli command Image_ExifTool_AIFFpm
- 1345: Linux cli command Regexp_Common_whitespacepm
- 1346: Linux cli command zip_fopen_encrypted
- 1347: Linux cli command isgreaterequal
- 1348: Linux cli command openpty
- 1349: Linux cli command Tk_bindpm
- 1350: Linux cli command Net_DNS_RR_NSEC3pm
- 1351: Linux cli command S_ISLNK
- 1352: Linux cli command zip_source_win32a
- 1353: Linux cli command Image_ExifTool_AACpm
- 1354: Linux cli command sockatmark
- 1355: Linux cli command Package_DeprecationManagerpm
- 1356: Linux cli command pcap_set_immediate_modepcap
- 1357: Linux cli command XtAppSetErrorHandler
- 1358: Linux cli command File_RandomAccesspm
- 1359: Linux cli command get_current_dir_name
- 1360: Linux cli command putchar
- 1361: Linux cli command TAILQ_CONCAT
- 1362: Linux cli command Regexp_Common_URI_telpm
- 1363: Linux cli command XtRegisterGrabAction
- 1364: Linux cli command Moose_Meta_Attribute_Native_Trait_Codepm
- 1365: Linux cli command Moose_Meta_Class_Immutable_Traitpm
- 1366: Linux cli command Module_Runtime_Conflictspm
- 1367: Linux cli command XmbufGetBufferAttributes
- 1368: Linux cli command isspace
- 1369: Linux cli command Pod_ParseUtilspm
- 1370: Linux cli command Tk_Radiobuttonpm
- 1371: Linux cli command XtResolvePathname
- 1372: Linux cli command pcap_set_rfmonpcap
- 1373: Linux cli command qsort
- 1374: Linux cli command NetPacket_USBMonpm
- 1375: Linux cli command remquol
- 1376: Linux cli command XtAppUnlock
- 1377: Linux cli command LWP_MediaTypespm
- 1378: Linux cli command Image_ExifTool_DJIpm
- 1379: Linux cli command sys_nerr
- 1380: Linux cli command muntrace
- 1381: Linux cli command Net_DNS_Mailboxpm
- 1382: Linux cli command Net_DNS_RR_EUI48pm
- 1383: Linux cli command strncasecmp
- 1384: Linux cli command XtInsertRawEventHandler
- 1385: Linux cli command Image_ExifTool_JPEGpm
- 1386: Linux cli command STAILQ_REMOVE
- 1387: Linux cli command ilogbl
- 1388: Linux cli command isupper
- 1389: Linux cli command Role_Tinypm
- 1390: Linux cli command simpleq
- 1391: Linux cli command Tk_Menupm
- 1392: Linux cli command vwarnx
- 1393: Linux cli command HTML_Filterpm
- 1394: Linux cli command svcudp_create
- 1395: Linux cli command loff_ttype
- 1396: Linux cli command Net_DNS_RR_RRSIGpm
- 1397: Linux cli command __malloc_hook
- 1398: Linux cli command HTML_Formpm
- 1399: Linux cli command HTML_Parsepm
- 1400: Linux cli command strtok
- 1401: Linux cli command gsignal
- 1402: Linux cli command fmemopen
- 1403: Linux cli command Net_DNS_SECpm
- 1404: Linux cli command optopt
- 1405: Linux cli command SIMPLEQ_REMOVE_HEAD
- 1406: Linux cli command XtGetSelectionValueIncremental
- 1407: Linux cli command getgrgid_r
- 1408: Linux cli command svc_register
- 1409: Linux cli command lrint
- 1410: Linux cli command XmbufDisplayBuffers
- 1411: Linux cli command setlinebuf
- 1412: Linux cli command xdr_destroy
- 1413: Linux cli command zip_source_file_create
- 1414: Linux cli command pthread_mutexattr_setrobust_np
- 1415: Linux cli command XtRemoveAllCallbacks
- 1416: Linux cli command zip_unchange
- 1417: Linux cli command isdigit
- 1418: Linux cli command Pod_Findpm
- 1419: Linux cli command stdio
- 1420: Linux cli command Moose_Manual_BestPracticespm
- 1421: Linux cli command Moose_Meta_Attribute_Nativepm
- 1422: Linux cli command islessgreater
- 1423: Linux cli command tcflag_ttype
- 1424: Linux cli command Image_ExifTool_PGFpm
- 1425: Linux cli command pthread_attr_getstack
- 1426: Linux cli command Tk_Clipboardpm
- 1427: Linux cli command Net_DNS_RR_NSpm
- 1428: Linux cli command Image_ExifTool_InfiRaypm
- 1429: Linux cli command sigvec
- 1430: Linux cli command Moose_Cookbook_Snack_Keywordspm
- 1431: Linux cli command pcap_dump_fopenpcap
- 1432: Linux cli command pvalloc
- 1433: Linux cli command Spreadsheet_WriteExcel_Propertiespm
- 1434: Linux cli command sinhf
- 1435: Linux cli command XtGetApplicationNameAndClass
- 1436: Linux cli command XtInsertEventTypeHandler
- 1437: Linux cli command Tk_UserGuidepm
- 1438: Linux cli command XtNumber
- 1439: Linux cli command zip_source_is_deleted
- 1440: Linux cli command mkostemps
- 1441: Linux cli command sigsetops
- 1442: Linux cli command lwptutpm
- 1443: Linux cli command getopt
- 1444: Linux cli command Net_TFTPpm
- 1445: Linux cli command pmap_getmaps
- 1446: Linux cli command XML_Writerpm
- 1447: Linux cli command malloc_stats
- 1448: Linux cli command Moose_Cookbookpm
- 1449: Linux cli command static_assert
- 1450: Linux cli command X11_Protocol_Ext_SHAPEpm
- 1451: Linux cli command locale_ttype
- 1452: Linux cli command pmap_set
- 1453: Linux cli command WWW_Mechanize_Imagepm
- 1454: Linux cli command XML_DOM_NodeListpm
- 1455: Linux cli command getentropy
- 1456: Linux cli command pthread_mutexattr_setpshared
- 1457: Linux cli command fnmatch
- 1458: Linux cli command Image_ExifTool_Kodakpm
- 1459: Linux cli command Net_DNS_RR_HTTPSpm
- 1460: Linux cli command Package_Stash_PPpm
- 1461: Linux cli command pcap_datalink_val_to_namepcap
- 1462: Linux cli command XtRemoveCallbacks
- 1463: Linux cli command getfsspec
- 1464: Linux cli command Moose_Cookbook_Meta_PrivateOrPublic_MethodMetaclasspm
- 1465: Linux cli command ts_fd
- 1466: Linux cli command lgammaf_r
- 1467: Linux cli command lgammal_r
- 1468: Linux cli command malloc
- 1469: Linux cli command sigignore
- 1470: Linux cli command xdr_authunix_parms
- 1471: Linux cli command XShapeCombineRegion
- 1472: Linux cli command htobe64
- 1473: Linux cli command pcap_tstamp_type_val_to_descriptionpcap
- 1474: Linux cli command File_MimeInfo_Cookbookpm
- 1475: Linux cli command Net_Netmaskpm
- 1476: Linux cli command Tk_DragDrop_SunConstpm
- 1477: Linux cli command ftello
- 1478: Linux cli command Image_ExifTool_Canonpm
- 1479: Linux cli command getpw
- 1480: Linux cli command pow10
- 1481: Linux cli command res_search
- 1482: Linux cli command freeifaddrs
- 1483: Linux cli command STAILQ_INSERT_TAIL
- 1484: Linux cli command j1f
- 1485: Linux cli command rand_r
- 1486: Linux cli command getdate_err
- 1487: Linux cli command Moose_Manual_MOPpm
- 1488: Linux cli command xdr_enum
- 1489: Linux cli command pthread_attr_setschedpolicy
- 1490: Linux cli command scandir
- 1491: Linux cli command getwc_unlocked
- 1492: Linux cli command libzip
- 1493: Linux cli command Spreadsheet_WriteExcel_Chart_Stockpm
- 1494: Linux cli command svcerr_systemerr
- 1495: Linux cli command XML_DOM_DOMImplementationpm
- 1496: Linux cli command XShmGetEventBase
- 1497: Linux cli command XML_Handler_XMLWriterpm
- 1498: Linux cli command zip_source_tell
- 1499: Linux cli command getwd
- 1500: Linux cli command X11_Protocol_Ext_BIG_REQUESTSpm
- 1501: Linux cli command fmaxf
- 1502: Linux cli command xdr_wrapstring
- 1503: Linux cli command jn
- 1504: Linux cli command wmempcpy
- 1505: Linux cli command XML_Handler_Samplepm
- 1506: Linux cli command zip_file_extra_field_get_by_id
- 1507: Linux cli command HTML_Tree_Scanningpm
- 1508: Linux cli command Image_ExifTool_ITCpm
- 1509: Linux cli command fpurge
- 1510: Linux cli command IO_Multiplexpm
- 1511: Linux cli command sysv_signal
- 1512: Linux cli command zip_delete
- 1513: Linux cli command zip_source_buffer_fragment
- 1514: Linux cli command HTML_Templatepm
- 1515: Linux cli command Tk_ColorEditorpm
- 1516: Linux cli command iswupper
- 1517: Linux cli command getgrnam
- 1518: Linux cli command jrand48
- 1519: Linux cli command Moose_Meta_Method_Delegationpm
- 1520: Linux cli command Regexp_Common_URI_ftppm
- 1521: Linux cli command isnormal
- 1522: Linux cli command j0l
- 1523: Linux cli command Net_DNS_RR_CDNSKEYpm
- 1524: Linux cli command Net_SSH2_Channelpm
- 1525: Linux cli command Pod_PlainTextpm
- 1526: Linux cli command pthread_setspecific
- 1527: Linux cli command strncmp
- 1528: Linux cli command XML_Perl2SAXpm
- 1529: Linux cli command lldiv_ttype
- 1530: Linux cli command uintN_ttype
- 1531: Linux cli command Image_ExifTool_ISOpm
- 1532: Linux cli command readdir
- 1533: Linux cli command isnanf
- 1534: Linux cli command Regexp_Common_URI_RFC2806pm
- 1535: Linux cli command getaddrinfo
- 1536: Linux cli command gethostbyname2_r
- 1537: Linux cli command Net_Server_Threadpm
- 1538: Linux cli command lckpwdf
- 1539: Linux cli command Moose_Conflictspm
- 1540: Linux cli command pthread_cond_timedwait
- 1541: Linux cli command sem_getvalue
- 1542: Linux cli command SLIST_FOREACH
- 1543: Linux cli command XShapeCombineShape
- 1544: Linux cli command Sub_Exporter_Tutorialpm
- 1545: Linux cli command Image_ExifTool_Leafpm
- 1546: Linux cli command sigisemptyset
- 1547: Linux cli command Text_CSV_PPpm
- 1548: Linux cli command Net_DNSpm
- 1549: Linux cli command SIMPLEQ_INSERT_TAIL
- 1550: Linux cli command Tk_optionspm
- 1551: Linux cli command __ppc_mdoom
- 1552: Linux cli command Net_DBus_Binding_Message_MethodReturnpm
- 1553: Linux cli command setkey
- 1554: Linux cli command X11_Protocol_Ext_DPMSpm
- 1555: Linux cli command XtManageChildren
- 1556: Linux cli command XtRealizeWidget
- 1557: Linux cli command XtRemoveTimeOut
- 1558: Linux cli command tmpnam
- 1559: Linux cli command XtIsComposite
- 1560: Linux cli command zip_register_progress_callback_with_state
- 1561: Linux cli command Moose_Cookbook_Meta_Table_MetaclassTraitpm
- 1562: Linux cli command fwide
- 1563: Linux cli command sys_errlist
- 1564: Linux cli command Term_ReadKeypm
- 1565: Linux cli command XML_DOM_Elementpm
- 1566: Linux cli command Regexp_Common_URI_prosperopm
- 1567: Linux cli command IO_WrapTiepm
- 1568: Linux cli command Moose_Cookbook_Stylepm
- 1569: Linux cli command Moose_Meta_Attribute_Native_Trait_Stringpm
- 1570: Linux cli command Image_ExifTool_CanonCustompm
- 1571: Linux cli command svc_getreqset
- 1572: Linux cli command gnu_dev_major
- 1573: Linux cli command getaliasent_r
- 1574: Linux cli command Spreadsheet_ParseExcel_FmtUnicodepm
- 1575: Linux cli command XtTranslateCoords
- 1576: Linux cli command XShmGetImage
- 1577: Linux cli command zip_file_extra_fields_count
- 1578: Linux cli command fwrite_unlocked
- 1579: Linux cli command Regexp_Common_profanitypm
- 1580: Linux cli command Tk_Checkbuttonpm
- 1581: Linux cli command XtUngrabKey
- 1582: Linux cli command IO_AtomicFilepm
- 1583: Linux cli command pcap_datalink_name_to_valpcap
- 1584: Linux cli command pthread_attr_getsigmask_np
- 1585: Linux cli command Moose_Meta_TypeConstraint_Unionpm
- 1586: Linux cli command Net_Pcappm
- 1587: Linux cli command XtClass
- 1588: Linux cli command rresvport
- 1589: Linux cli command HTTP_DAV_Resourcepm
- 1590: Linux cli command Net_DNS_Resolver_Basepm
- 1591: Linux cli command useconds_ttype
- 1592: Linux cli command pcap_datalinkpcap
- 1593: Linux cli command XtAppProcessEvent
- 1594: Linux cli command inet_netof
- 1595: Linux cli command Moose_Meta_Method_Augmentedpm
- 1596: Linux cli command register_printf_specifier
- 1597: Linux cli command sighold
- 1598: Linux cli command get_myaddress
- 1599: Linux cli command tcgetattr
- 1600: Linux cli command getutmpx
- 1601: Linux cli command hasmntopt
- 1602: Linux cli command WWW_Mechanize_Linkpm
- 1603: Linux cli command File_MimeInfo_Roxpm
- 1604: Linux cli command getauxval
- 1605: Linux cli command Tk_chooseDirectorypm
- 1606: Linux cli command sigrelse
- 1607: Linux cli command toascii
- 1608: Linux cli command Net_DNS_Nameserverpm
- 1609: Linux cli command zip_source_win32a_create
- 1610: Linux cli command gmtime_r
- 1611: Linux cli command gammal
- 1612: Linux cli command Net_DNS_Resolver_Recursepm
- 1613: Linux cli command setnetgrent
- 1614: Linux cli command XML_DOM_NamedNodeMappm
- 1615: Linux cli command Parse_Win32Registrypm
- 1616: Linux cli command Spreadsheet_ParseExcel_SaveParser_Worksheetpm
- 1617: Linux cli command srandom_r
- 1618: Linux cli command timeam
- 1619: Linux cli command swab
- 1620: Linux cli command XtProcessEvent
- 1621: Linux cli command Tk_Adjusterpm
- 1622: Linux cli command if_nameindex
- 1623: Linux cli command futimes
- 1624: Linux cli command pthread_setcancelstate
- 1625: Linux cli command PA_FLAG_PTRconst
- 1626: Linux cli command pcap_setnonblockpcap
- 1627: Linux cli command res_nquery
- 1628: Linux cli command shm_unlink
- 1629: Linux cli command XtRemoveGrab
- 1630: Linux cli command Net_RawIPpm
- 1631: Linux cli command gethostbyname
- 1632: Linux cli command Moose_Cookbook_Legacy_Labeled_AttributeMetaclasspm
- 1633: Linux cli command powf
- 1634: Linux cli command zip_errors
- 1635: Linux cli command Image_ExifTool_WriteIPTCpm
- 1636: Linux cli command Tk_DragDrop_Commonpm
- 1637: Linux cli command URI_Splitpm
- 1638: Linux cli command XtAppGetErrorDatabase
- 1639: Linux cli command getline
- 1640: Linux cli command Net_DNS_SEC_libcryptopm
- 1641: Linux cli command XtAppSetFallbackResources
- 1642: Linux cli command pthread_sigqueue
- 1643: Linux cli command XtIsTopLevelShell
- 1644: Linux cli command ftok
- 1645: Linux cli command XtOpenApplication
- 1646: Linux cli command isalpha
- 1647: Linux cli command WWW_RobotRulespm
- 1648: Linux cli command Tk_palettepm
- 1649: Linux cli command Tk_tkvarspm
- 1650: Linux cli command utmpxname
- 1651: Linux cli command strerrordesc_np
- 1652: Linux cli command xdr_string
- 1653: Linux cli command pthread_mutex_init
- 1654: Linux cli command ts_conf_get
- 1655: Linux cli command JSON_backportPP_Compat5005pm
- 1656: Linux cli command ftw
- 1657: Linux cli command Tk_focuspm
- 1658: Linux cli command zip_libzip_version
- 1659: Linux cli command File_MimeInfopm
- 1660: Linux cli command getpwnam_r
- 1661: Linux cli command xdr_accepted_reply
- 1662: Linux cli command Moose_Meta_Role_Application_ToInstancepm
- 1663: Linux cli command zip_source_filep
- 1664: Linux cli command HTML_Form_TextInputpm
- 1665: Linux cli command pcap_list_datalinkspcap
- 1666: Linux cli command ts_read_raw_mt
- 1667: Linux cli command iruserok_af
- 1668: Linux cli command modff
- 1669: Linux cli command rawmemchr
- 1670: Linux cli command IO_Socket_SSLpm
- 1671: Linux cli command Net_DNS_ZoneFilepm
- 1672: Linux cli command Regexp_Common_URI_httppm
- 1673: Linux cli command XtSetErrorMsgHandler
- 1674: Linux cli command if_freenameindex
- 1675: Linux cli command zip_file_attributes_init
- 1676: Linux cli command strerror_r
- 1677: Linux cli command XtBuildEventMask
- 1678: Linux cli command key_encryptsession
- 1679: Linux cli command ssize_ttype
- 1680: Linux cli command XtGetGC
- 1681: Linux cli command Tk_Labelframepm
- 1682: Linux cli command nextdown
- 1683: Linux cli command XtAppAddTimeOut
- 1684: Linux cli command XtSetSelectionParameters
- 1685: Linux cli command isascii
- 1686: Linux cli command X11_Keysymspm
- 1687: Linux cli command NetPacket_ICMPv6pm
- 1688: Linux cli command XtNoticeSignal
- 1689: Linux cli command HTML_FormatRTFpm
- 1690: Linux cli command lsearch
- 1691: Linux cli command fminl
- 1692: Linux cli command nfs4_uid_to_name
- 1693: Linux cli command IO_Compress_Brotlipm
- 1694: Linux cli command Moose_Meta_Role_Application_RoleSummationpm
- 1695: Linux cli command XtRemoveInput
- 1696: Linux cli command sockaddr_intype
- 1697: Linux cli command XML_Parser_PerlSAXpm
- 1698: Linux cli command pathconf
- 1699: Linux cli command printf
- 1700: Linux cli command pthread_attr_setstacksize
- 1701: Linux cli command HTML_Form_FileInputpm
- 1702: Linux cli command Net_DNS_RR_OPTpm
- 1703: Linux cli command lockf
- 1704: Linux cli command Spreadsheet_WriteExcel_Chart_Linepm
- 1705: Linux cli command Image_ExifTool_Lang_trpm
- 1706: Linux cli command X11_Protocol_Connection_INETSocketpm
- 1707: Linux cli command svcraw_create
- 1708: Linux cli command XtDestroyWidget
- 1709: Linux cli command Net_DBus_Binding_Valuepm
- 1710: Linux cli command printf_arginfo_size_functiontype
- 1711: Linux cli command svcfd_create
- 1712: Linux cli command Image_ExifTool_XMP2pm
- 1713: Linux cli command Sub_Exporterpm
- 1714: Linux cli command Text_WrapI18Npm
- 1715: Linux cli command URI_WithBasepm
- 1716: Linux cli command Net_DBus_Binding_Messagepm
- 1717: Linux cli command HTML_Elementpm
- 1718: Linux cli command sigstack
- 1719: Linux cli command IO_All_MLDBMpm
- 1720: Linux cli command IO_All_FTPpm
- 1721: Linux cli command sqrtf
- 1722: Linux cli command zip_file_get_error
- 1723: Linux cli command innetgr
- 1724: Linux cli command Net_DNS_RR_NULLpm
- 1725: Linux cli command Image_ExifTool_MPCpm
- 1726: Linux cli command XML_DOM_AttDefpm
- 1727: Linux cli command insque
- 1728: Linux cli command Net_SSH2pm
- 1729: Linux cli command rand
- 1730: Linux cli command XtVaAppInitialize
- 1731: Linux cli command xdr_pointer
- 1732: Linux cli command XtAppAddSignal
- 1733: Linux cli command Image_ExifTool_M2TSpm
- 1734: Linux cli command XtAppAddActions
- 1735: Linux cli command Moose_Exporterpm
- 1736: Linux cli command XML_DOM_EntityReferencepm
- 1737: Linux cli command Image_ExifTool_Lang_zh_cnpm
- 1738: Linux cli command wcsstr
- 1739: Linux cli command Net_Server_PSGIpm
- 1740: Linux cli command Image_ExifTool_NikonSettingspm
- 1741: Linux cli command Image_ExifTool_TagInfoXMLpm
- 1742: Linux cli command XtAppAddInput
- 1743: Linux cli command get_nprocs
- 1744: Linux cli command Spreadsheet_WriteExcelpm
- 1745: Linux cli command XtIsWMShell
- 1746: Linux cli command Gitpm
- 1747: Linux cli command posix_spawn
- 1748: Linux cli command Net_Serverpm
- 1749: Linux cli command versionsort
- 1750: Linux cli command Image_ExifTool_PICTpm
- 1751: Linux cli command pcap_freealldevspcap
- 1752: Linux cli command remainder
- 1753: Linux cli command Image_ExifTool_Exifpm
- 1754: Linux cli command XtUninstallTranslations
- 1755: Linux cli command fscanf
- 1756: Linux cli command stdout
- 1757: Linux cli command Tk_grabpm
- 1758: Linux cli command ts_libversion
- 1759: Linux cli command XtDispatchEventToWidget
- 1760: Linux cli command Tk_Xpm
- 1761: Linux cli command XtCallCallbackList
- 1762: Linux cli command Image_ExifTool_RTFpm
- 1763: Linux cli command Net_DNS_DomainNamepm
- 1764: Linux cli command svc_run
- 1765: Linux cli command Net_DNS_Headerpm
- 1766: Linux cli command pcappcap
- 1767: Linux cli command tolower_l
- 1768: Linux cli command URI_filepm
- 1769: Linux cli command PA_POINTERconst
- 1770: Linux cli command Image_ExifTool_GIFpm
- 1771: Linux cli command Spreadsheet_ParseExcel_FmtJapanpm
- 1772: Linux cli command XtParseTranslationTable
- 1773: Linux cli command pcap_looppcap
- 1774: Linux cli command pcap_minor_versionpcap
- 1775: Linux cli command twalk
- 1776: Linux cli command key_secretkey_is_set
- 1777: Linux cli command pcap_set_timeoutpcap
- 1778: Linux cli command seekdir
- 1779: Linux cli command strtoimax
- 1780: Linux cli command XtSetWarningHandler
- 1781: Linux cli command __fwritable
- 1782: Linux cli command pthread_setattr_default_np
- 1783: Linux cli command frexpf
- 1784: Linux cli command XtAppWarning
- 1785: Linux cli command pow10l
- 1786: Linux cli command SLIST_HEAD
- 1787: Linux cli command XtScreenDatabase
- 1788: Linux cli command getnetent
- 1789: Linux cli command lrintl
- 1790: Linux cli command LIST_INSERT_HEAD
- 1791: Linux cli command XtAsprintf
- 1792: Linux cli command IO_All_Filesyspm
- 1793: Linux cli command sinf
- 1794: Linux cli command registerrpc
- 1795: Linux cli command libi2c
- 1796: Linux cli command ts_error_fn
- 1797: Linux cli command Net_DBus_Reactorpm
- 1798: Linux cli command Net_DNS_RR_SSHFPpm
- 1799: Linux cli command optarg
- 1800: Linux cli command localtime_r
- 1801: Linux cli command XtPeekEvent
- 1802: Linux cli command Image_ExifTool_MinoltaRawpm
- 1803: Linux cli command herror
- 1804: Linux cli command Parallel_ForkManager_Childpm
- 1805: Linux cli command getprotobynumber_r
- 1806: Linux cli command setspent
- 1807: Linux cli command Sub_Installpm
- 1808: Linux cli command zip_file_error_get
- 1809: Linux cli command Net_DBus_Servicepm
- 1810: Linux cli command getprotobyname
- 1811: Linux cli command htobe32
- 1812: Linux cli command XML_Parser_Style_Treepm
- 1813: Linux cli command XtIsSensitive
- 1814: Linux cli command XtVaAppCreateShell
- 1815: Linux cli command twalk_r
- 1816: Linux cli command Image_ExifTool_Matroskapm
- 1817: Linux cli command Net_DNS_Updatepm
- 1818: Linux cli command SLIST_EMPTY
- 1819: Linux cli command swprintf
- 1820: Linux cli command sysconf
- 1821: Linux cli command vfwprintf
- 1822: Linux cli command strsignal
- 1823: Linux cli command qecvt
- 1824: Linux cli command inplaceam
- 1825: Linux cli command sigdescr_np
- 1826: Linux cli command xdr_setpos
- 1827: Linux cli command XtIsRectObj
- 1828: Linux cli command HTTP_Negotiatepm
- 1829: Linux cli command res_nclose
- 1830: Linux cli command Moose_Manual_Unsweetenedpm
- 1831: Linux cli command opterr
- 1832: Linux cli command XtGrabPointer
- 1833: Linux cli command strrchr
- 1834: Linux cli command isfdtype
- 1835: Linux cli command localtime
- 1836: Linux cli command Spreadsheet_ParseExcel_Worksheetpm
- 1837: Linux cli command Image_ExifTool_DICOMpm
- 1838: Linux cli command lldiv
- 1839: Linux cli command Tk_InputOpm
- 1840: Linux cli command XauUnlockAuth
- 1841: Linux cli command setusershell
- 1842: Linux cli command Image_ExifTool_BZZpm
- 1843: Linux cli command getc
- 1844: Linux cli command remove
- 1845: Linux cli command Moose_Meta_Method_Accessorpm
- 1846: Linux cli command Net_DNS_Questionpm
- 1847: Linux cli command Regexp_Common_netpm
- 1848: Linux cli command XtCallAcceptFocus
- 1849: Linux cli command pthread_attr_getaffinity_np
- 1850: Linux cli command Image_ExifTool_Oggpm
- 1851: Linux cli command Moose_Cookbook_Basics_BinaryTree_BuilderAndLazyBuildpm
- 1852: Linux cli command Moose_Meta_Role_Compositepm
- 1853: Linux cli command getaliasbyname_r
- 1854: Linux cli command ulimit
- 1855: Linux cli command isxdigit_l
- 1856: Linux cli command Net_DBus_Test_MockConnectionpm
- 1857: Linux cli command login
- 1858: Linux cli command strverscmp
- 1859: Linux cli command float_ttype
- 1860: Linux cli command Image_ExifTool_WTVpm
- 1861: Linux cli command zip_source_open
- 1862: Linux cli command Net_HTTP_NBpm
- 1863: Linux cli command getipnodebyaddr
- 1864: Linux cli command pthread_self
- 1865: Linux cli command sigdelset
- 1866: Linux cli command pcap_free_tstamp_typespcap
- 1867: Linux cli command Moose_Manual_Conceptspm
- 1868: Linux cli command pcap_setfilterpcap
- 1869: Linux cli command Tk_optionpm
- 1870: Linux cli command getspent_r
- 1871: Linux cli command NetPacket_IPpm
- 1872: Linux cli command SNMPpm
- 1873: Linux cli command srand
- 1874: Linux cli command strtoumax
- 1875: Linux cli command X11_Protocol_Ext_XFree86_Miscpm
- 1876: Linux cli command zip_source_rollback_write
- 1877: Linux cli command logf
- 1878: Linux cli command strtod
- 1879: Linux cli command XML_DOM_Documentpm
- 1880: Linux cli command XtResizeWidget
- 1881: Linux cli command Net_SSH2_PublicKeypm
- 1882: Linux cli command XdbeSwapBuffers
- 1883: Linux cli command log
- 1884: Linux cli command Moose_Cookbook_Basics_Genome_OverloadingSubtypesAndCoercionpm
- 1885: Linux cli command TAILQ_INSERT_TAIL
- 1886: Linux cli command pcap_set_snaplenpcap
- 1887: Linux cli command readdiram
- 1888: Linux cli command frexp
- 1889: Linux cli command statvfs
- 1890: Linux cli command wmemset
- 1891: Linux cli command IO_All_Socketpm
- 1892: Linux cli command siggetmask
- 1893: Linux cli command ungetc
- 1894: Linux cli command XtIsObject
- 1895: Linux cli command zip_add_dir
- 1896: Linux cli command XtDirectConvert
- 1897: Linux cli command Moose_Cookbook_Extending_ExtensionOverviewpm
- 1898: Linux cli command Test_Moosepm
- 1899: Linux cli command zip_file_set_comment
- 1900: Linux cli command PA_FLAG_LONGconst
- 1901: Linux cli command putwchar_unlocked
- 1902: Linux cli command zip_fopen_index
- 1903: Linux cli command xdr_callmsg
- 1904: Linux cli command Image_ExifTool_QuickTimepm
- 1905: Linux cli command Tk_Reindexpm
- 1906: Linux cli command xdr_short
- 1907: Linux cli command syslog
- 1908: Linux cli command fputws
- 1909: Linux cli command Net_DBus_Binding_Message_Errorpm
- 1910: Linux cli command Net_DNS_RR_KEYpm
- 1911: Linux cli command Net_Server_Proto_TCPpm
- 1912: Linux cli command zip_error_to_str
- 1913: Linux cli command Image_ExifTool_FujiFilmpm
- 1914: Linux cli command Regexp_Common_URI_RFC1035pm
- 1915: Linux cli command futimens
- 1916: Linux cli command Moose_Manual_Attributespm
- 1917: Linux cli command Tk_FileSelectpm
- 1918: Linux cli command svc_getargs
- 1919: Linux cli command TAILQ_INIT
- 1920: Linux cli command zip_file_rename
- 1921: Linux cli command gets
- 1922: Linux cli command Tk_pTkpm
- 1923: Linux cli command scanf
- 1924: Linux cli command Tk_ProgressBarpm
- 1925: Linux cli command XtUnregisterDrawable
- 1926: Linux cli command Net_DNS_RR_DHCIDpm
- 1927: Linux cli command Moose_Meta_Role_Method_Requiredpm
- 1928: Linux cli command passwd2des
- 1929: Linux cli command in6_addrtype
- 1930: Linux cli command pcap_next_expcap
- 1931: Linux cli command Net_DNS_RR_DELEGpm
- 1932: Linux cli command pthread_cleanup_pop_restore_np
- 1933: Linux cli command HTTP_DAV_Lockpm
- 1934: Linux cli command XML_XPathEngine_NodeSetpm
- 1935: Linux cli command pcap_open_offline_with_tstamp_precisionpcap
- 1936: Linux cli command LIST_INSERT_BEFORE
- 1937: Linux cli command scalblnf
- 1938: Linux cli command log1pl
- 1939: Linux cli command nan
- 1940: Linux cli command svcerr_noprog
- 1941: Linux cli command XtUnrealizeWidget
- 1942: Linux cli command zip_source_keep
- 1943: Linux cli command pthread_getname_np
- 1944: Linux cli command Image_ExifTool_XMPpm
- 1945: Linux cli command rresvport_af
- 1946: Linux cli command pcap_nextpcap
- 1947: Linux cli command XShmCreateImage
- 1948: Linux cli command Image_ExifTool_JSONpm
- 1949: Linux cli command Tk_Pixmappm
- 1950: Linux cli command mallinfo2
- 1951: Linux cli command PA_FLAG_LONG_DOUBLEconst
- 1952: Linux cli command zip_source_filep_create
- 1953: Linux cli command Image_ExifTool_Rawzorpm
- 1954: Linux cli command mpool
- 1955: Linux cli command uselocale
- 1956: Linux cli command gethostbyname2
- 1957: Linux cli command pthread_spin_destroy
- 1958: Linux cli command Net_CIDRpm
- 1959: Linux cli command Net_DNS_RR_IPSECKEYpm
- 1960: Linux cli command xdr_pmap
- 1961: Linux cli command Moose_Intropm
- 1962: Linux cli command strcat
- 1963: Linux cli command isgraph
- 1964: Linux cli command Moose_Meta_Attribute_Native_Trait_Arraypm
- 1965: Linux cli command Image_ExifTool_Theorapm
- 1966: Linux cli command STAILQ_INSERT_AFTER
- 1967: Linux cli command Moose_Meta_Attribute_Native_Traitpm
- 1968: Linux cli command ttyname
- 1969: Linux cli command XtAppSetExitFlag
- 1970: Linux cli command getrpcbynumber
- 1971: Linux cli command tan
- 1972: Linux cli command xdr_u_char
- 1973: Linux cli command XShmCreatePixmap
- 1974: Linux cli command forkpty
- 1975: Linux cli command mbrtowc
- 1976: Linux cli command Regexp_Common_URI_RFC2384pm
- 1977: Linux cli command towlower_l
- 1978: Linux cli command xdecrypt
- 1979: Linux cli command getfsent
- 1980: Linux cli command int8_ttype
- 1981: Linux cli command strerror
- 1982: Linux cli command Moose_Manual_Exceptionspm
- 1983: Linux cli command sigabbrev_np
- 1984: Linux cli command TAILQ_FIRST
- 1985: Linux cli command XtAppErrorMsg
- 1986: Linux cli command zip_fclose
- 1987: Linux cli command SLIST_REMOVE_HEAD
- 1988: Linux cli command fseek
- 1989: Linux cli command Module_Runtimepm
- 1990: Linux cli command pthread_create
- 1991: Linux cli command wcstok
- 1992: Linux cli command zip_stat
- 1993: Linux cli command Number_Comparepm
- 1994: Linux cli command XML_Parser_Style_Objectspm
- 1995: Linux cli command off64_ttype
- 1996: Linux cli command Image_ExifTool_MNGpm
- 1997: Linux cli command Image_ExifTool_Reconyxpm
- 1998: Linux cli command sem_destroy
- 1999: Linux cli command XtOwnSelectionIncremental
- 2000: Linux cli command __free_hook
- 2001: Linux cli command getaddrinfo_a
- 2002: Linux cli command HTTP_Headerspm
- 2003: Linux cli command hypot
- 2004: Linux cli command Locale_gettextpm
- 2005: Linux cli command getutmp
- 2006: Linux cli command STAILQ_EMPTY
- 2007: Linux cli command MIME_Charsetpm
- 2008: Linux cli command Net_Server_HTTPpm
- 2009: Linux cli command nexttoward
- 2010: Linux cli command XtDisplayOfObject
- 2011: Linux cli command gethostbyaddr_r
- 2012: Linux cli command Moose_Meta_Attribute_Native_Trait_Boolpm
- 2013: Linux cli command wmemcmp
- 2014: Linux cli command XML_Parser_Style_Debugpm
- 2015: Linux cli command Math_Random_ISAAC_PPpm
- 2016: Linux cli command Image_ExifTool_Radiancepm
- 2017: Linux cli command lgamma_r
- 2018: Linux cli command Role_Tiny_Withpm
- 2019: Linux cli command SIMPLEQ_FIRST
- 2020: Linux cli command tcsendbreak
- 2021: Linux cli command isless
- 2022: Linux cli command Tk_BrowseEntrypm
- 2023: Linux cli command llroundf
- 2024: Linux cli command XML_Handler_CanonXMLWriterpm
- 2025: Linux cli command Image_ExifTool_Lang_itpm
- 2026: Linux cli command pmap_rmtcall
- 2027: Linux cli command Regexp_Common_URI_RFC1808pm
- 2028: Linux cli command XML_Parser_Style_Subspm
- 2029: Linux cli command getpwent
- 2030: Linux cli command Moose_Meta_TypeConstraintpm
- 2031: Linux cli command isinfl
- 2032: Linux cli command LWPpm
- 2033: Linux cli command zip_name_locate
- 2034: Linux cli command LWP_UserAgentpm
- 2035: Linux cli command pcap_lib_versionpcap
- 2036: Linux cli command XtAddTimeOut
- 2037: Linux cli command jrand48_r
- 2038: Linux cli command getservbyport
- 2039: Linux cli command Moose_Manual_Resourcespm
- 2040: Linux cli command offsetof
- 2041: Linux cli command Image_ExifTool_7Zpm
- 2042: Linux cli command Net_SMTP_SSLpm
- 2043: Linux cli command pthread_timedjoin_np
- 2044: Linux cli command powl
- 2045: Linux cli command XtConvertCase
- 2046: Linux cli command if_nametoindex
- 2047: Linux cli command Params_Classifypm
- 2048: Linux cli command Image_ExifTool_XISFpm
- 2049: Linux cli command toupper
- 2050: Linux cli command Moose_Meta_Method_Constructorpm
- 2051: Linux cli command Net_DNS_Resolver_os2pm
- 2052: Linux cli command pcap_get_required_select_timeoutpcap
- 2053: Linux cli command pthread_attr_getstacksize
- 2054: Linux cli command Image_ExifTool_GEpm
- 2055: Linux cli command Params_Util_PPpm
- 2056: Linux cli command TAILQ_FOREACH
- 2057: Linux cli command Image_ExifTool_Lang_en_capm
- 2058: Linux cli command pcap_set_tstamp_precisionpcap
- 2059: Linux cli command strcoll
- 2060: Linux cli command zip_source_win32handle_create
- 2061: Linux cli command ts_setup
- 2062: Linux cli command Moose_Cookbook_Roles_Restartable_AdvancedCompositionpm
- 2063: Linux cli command wcschr
- 2064: Linux cli command glob
- 2065: Linux cli command pcap_set_datalinkpcap
- 2066: Linux cli command getservent_r
- 2067: Linux cli command revoutputam
- 2068: Linux cli command scalbnf
- 2069: Linux cli command String_Randompm
- 2070: Linux cli command Spreadsheet_WriteExcel_Formulapm
- 2071: Linux cli command XtAppAddConverter
- 2072: Linux cli command tanf
- 2073: Linux cli command STAILQ_FIRST
- 2074: Linux cli command XtVaSetValues
- 2075: Linux cli command pthread_attr_setdetachstate
- 2076: Linux cli command strcasestr
- 2077: Linux cli command Unicode_GCStringpm
- 2078: Linux cli command Mail_Utilpm
- 2079: Linux cli command XShapeSelectInput
- 2080: Linux cli command Net_DBus_Binding_Introspectorpm
- 2081: Linux cli command Net_DBus_Callbackpm
- 2082: Linux cli command XShmDetach
- 2083: Linux cli command zip_get_archive_comment
- 2084: Linux cli command Net_Server_PreForkpm
- 2085: Linux cli command XtPopupSpringLoaded
- 2086: Linux cli command fputc_unlocked
- 2087: Linux cli command XmbufGetVersion
- 2088: Linux cli command gnu_get_libc_release
- 2089: Linux cli command Image_ExifTool_WPGpm
- 2090: Linux cli command mbsrtowcs
- 2091: Linux cli command Net_HTTPSpm
- 2092: Linux cli command pcap_tstamp_type_name_to_valpcap
- 2093: Linux cli command zip_error_system_type
- 2094: Linux cli command fts_open
- 2095: Linux cli command XtAddCallbacks
- 2096: Linux cli command Spreadsheet_WriteExcel_OLEwriterpm
- 2097: Linux cli command lroundf
- 2098: Linux cli command Moose_Cookbook_Basics_BankAccount_MethodModifiersAndSubclassingpm
- 2099: Linux cli command Moose_Cookbook_Basics_Point_AttributesAndSubclassingpm
- 2100: Linux cli command tcsetpgrp
- 2101: Linux cli command File_Listingpm
- 2102: Linux cli command Net_DNS_SEC_Privatepm
- 2103: Linux cli command pthread_mutexattr_init
- 2104: Linux cli command pcap_set_tstamp_typepcap
- 2105: Linux cli command gnu_dev_makedev
- 2106: Linux cli command res_nsend
- 2107: Linux cli command logbl
- 2108: Linux cli command zip_discard
- 2109: Linux cli command pthread_mutexattr_destroy
- 2110: Linux cli command wcsncmp
- 2111: Linux cli command Image_ExifTool_Importpm
- 2112: Linux cli command le32toh
- 2113: Linux cli command seed48
- 2114: Linux cli command klogctl
- 2115: Linux cli command getgrnam_r
- 2116: Linux cli command mcheck_check_all
- 2117: Linux cli command Moose_Manual_Exceptions_Manifestpm
- 2118: Linux cli command significandl
- 2119: Linux cli command Tk_packpm
- 2120: Linux cli command SIMPLEQ_REMOVE
- 2121: Linux cli command valloc
- 2122: Linux cli command zip_source_win32w
- 2123: Linux cli command Net_DNS_Resolver_os390pm
- 2124: Linux cli command mq_open
- 2125: Linux cli command trunc
- 2126: Linux cli command XtSetEventDispatcher
- 2127: Linux cli command Image_ExifTool_RSRCpm
- 2128: Linux cli command Image_ExifTool_SonyIDCpm
- 2129: Linux cli command XcupGetReservedColormapEntries
- 2130: Linux cli command zip_error_to_data
- 2131: Linux cli command SLIST_REMOVE
- 2132: Linux cli command ts_close
- 2133: Linux cli command Image_ExifTool_BPGpm
- 2134: Linux cli command labs
- 2135: Linux cli command Image_ExifTool_PLISTpm
- 2136: Linux cli command NetSNMP_netsnmp_request_infoPtrpm
- 2137: Linux cli command siginfo_ttype
- 2138: Linux cli command Image_ExifTool_Sanyopm
- 2139: Linux cli command svc_destroy
- 2140: Linux cli command XML_DOM_DocumentFragmentpm
- 2141: Linux cli command log10
- 2142: Linux cli command XauDisposeAuth
- 2143: Linux cli command pthread_exit
- 2144: Linux cli command res_nsearch
- 2145: Linux cli command Image_ExifTool_BuildTagLookuppm
- 2146: Linux cli command sigismember
- 2147: Linux cli command svcerr_auth
- 2148: Linux cli command XtConvertAndStore
- 2149: Linux cli command tcflow
- 2150: Linux cli command URI_sockspm
- 2151: Linux cli command posix_memalign
- 2152: Linux cli command Moosepm
- 2153: Linux cli command setrpcent
- 2154: Linux cli command Net_Server_Proto_UNIXDGRAMpm
- 2155: Linux cli command pcap_statspcap
- 2156: Linux cli command Tk_Dialogpm
- 2157: Linux cli command ftrylockfile
- 2158: Linux cli command llabs
- 2159: Linux cli command xdr_double
- 2160: Linux cli command XtRemoveCallback
- 2161: Linux cli command strftime
- 2162: Linux cli command Tk_DialogBoxpm
- 2163: Linux cli command uid_ttype
- 2164: Linux cli command ispunct
- 2165: Linux cli command perl-tkpm
- 2166: Linux cli command __ppc_yield
- 2167: Linux cli command IO_All_DBMpm
- 2168: Linux cli command zip_source_close
- 2169: Linux cli command Module_Implementationpm
- 2170: Linux cli command Net_SSH2_Listenerpm
- 2171: Linux cli command ts_open_restricted
- 2172: Linux cli command STAILQ_FOREACH
- 2173: Linux cli command Net_Server_Proto_UDPpm
- 2174: Linux cli command Perl4_CoreLibspm
- 2175: Linux cli command Image_ExifTool_Lang_zh_twpm
- 2176: Linux cli command id_ttype
- 2177: Linux cli command zip_source_buffer
- 2178: Linux cli command inet_lnaof
- 2179: Linux cli command Moose_Unsweetenedpm
- 2180: Linux cli command mbsinit
- 2181: Linux cli command Net_DBuspm
- 2182: Linux cli command netlink
- 2183: Linux cli command HTTP_Cookies_Netscapepm
- 2184: Linux cli command PA_INTconst
- 2185: Linux cli command pclose
- 2186: Linux cli command Tk_Scrolledpm
- 2187: Linux cli command strlen
- 2188: Linux cli command logb
- 2189: Linux cli command memcmp
- 2190: Linux cli command Net_SSH2_SFTPpm
- 2191: Linux cli command isalnum
- 2192: Linux cli command Regexp_Common_URI_filepm
- 2193: Linux cli command wmemmove
- 2194: Linux cli command getpwent_r
- 2195: Linux cli command sockaddr_storagetype
- 2196: Linux cli command Socket6pm
- 2197: Linux cli command Tk_Messagepm
- 2198: Linux cli command warnx
- 2199: Linux cli command iswpunct
- 2200: Linux cli command XtCreatePopupShell
- 2201: Linux cli command PA_CHARconst
- 2202: Linux cli command pthread_getaffinity_np
- 2203: Linux cli command pthread_spin_unlock
- 2204: Linux cli command XtCreateApplicationContext
- 2205: Linux cli command INFINITY
- 2206: Linux cli command inet_ntop
- 2207: Linux cli command XtHooksOfDisplay
- 2208: Linux cli command Net_SNMPpm
- 2209: Linux cli command S_ISREG
- 2210: Linux cli command posix_madvise
- 2211: Linux cli command pthread_key_delete
- 2212: Linux cli command res_init
- 2213: Linux cli command XtKeysymToKeycodeList
- 2214: Linux cli command File_Find_Rulepm
- 2215: Linux cli command fmtmsg
- 2216: Linux cli command intptr_ttype
- 2217: Linux cli command isascii_l
- 2218: Linux cli command Spreadsheet_WriteExcel_Chart_Piepm
- 2219: Linux cli command Moose_Cookbook_Basics_BinaryTree_AttributeFeaturespm
- 2220: Linux cli command svcudp_bufcreate
- 2221: Linux cli command pthread_cond_signal
- 2222: Linux cli command X11_Protocol_Ext_RENDERpm
- 2223: Linux cli command log10f
- 2224: Linux cli command memcpy
- 2225: Linux cli command strfry
- 2226: Linux cli command Tk_chooseColorpm
- 2227: Linux cli command XtUngrabButton
- 2228: Linux cli command getSaveFilepm
- 2229: Linux cli command Mail_Field_Genericpm
- 2230: Linux cli command random_r
- 2231: Linux cli command xdr_free
- 2232: Linux cli command XtToolkitInitialize
- 2233: Linux cli command ruserok
- 2234: Linux cli command timerisset
- 2235: Linux cli command fmaxl
- 2236: Linux cli command LWP_Protocol_sockspm
- 2237: Linux cli command setstate_r
- 2238: Linux cli command JSON_backportPP_Booleanpm
- 2239: Linux cli command Moose_Meta_TypeConstraint_Parameterizablepm
- 2240: Linux cli command XeviQueryVersion
- 2241: Linux cli command setPalettepm
- 2242: Linux cli command zip_unchange_archive
- 2243: Linux cli command Image_ExifTool_Lytropm
- 2244: Linux cli command Net_DNS_RR_ISDNpm
- 2245: Linux cli command HTTP_Datepm
- 2246: Linux cli command Image_ExifTool_JPEGDigestpm
- 2247: Linux cli command itimerspectype
- 2248: Linux cli command scalblnl
- 2249: Linux cli command strchrnul
- 2250: Linux cli command getutent
- 2251: Linux cli command HTML_Tree_AboutTreespm
- 2252: Linux cli command mkdtemp
- 2253: Linux cli command newlocale
- 2254: Linux cli command stderr
- 2255: Linux cli command hdestroy
- 2256: Linux cli command NetPacket_IPXpm
- 2257: Linux cli command Image_ExifTool_WriteXMPpm
- 2258: Linux cli command pthread_key_create
- 2259: Linux cli command STAILQ_ENTRY
- 2260: Linux cli command y1f
- 2261: Linux cli command getnetbyaddr_r
- 2262: Linux cli command pthread_mutex_consistent_np
- 2263: Linux cli command Tk_HListpm
- 2264: Linux cli command mq_timedsend
- 2265: Linux cli command Math_Random_ISAAC_XSpm
- 2266: Linux cli command IO_All_Pipepm
- 2267: Linux cli command towupper
- 2268: Linux cli command Net_DNS_RR_X25pm
- 2269: Linux cli command regexec
- 2270: Linux cli command tmpnam_r
- 2271: Linux cli command zip_file_set_mtime
- 2272: Linux cli command Net_Server_INETpm
- 2273: Linux cli command pthread_attr_getdetachstate
- 2274: Linux cli command pthread_yield
- 2275: Linux cli command gai_strerror
- 2276: Linux cli command stdin
- 2277: Linux cli command getprotoent
- 2278: Linux cli command XtCallCallbacks
- 2279: Linux cli command int16_ttype
- 2280: Linux cli command Net_Server_Log_Log_Log4perlpm
- 2281: Linux cli command __malloc_initialize_hook
- 2282: Linux cli command Tk_messageBoxpm
- 2283: Linux cli command HTTP_Daemonpm
- 2284: Linux cli command iconv
- 2285: Linux cli command Image_ExifTool_LNKpm
- 2286: Linux cli command Moose_Cookbook_Extending_Debugging_BaseClassRolepm
- 2287: Linux cli command pcap_initpcap
- 2288: Linux cli command regoff_ttype
- 2289: Linux cli command strnlen
- 2290: Linux cli command File_Find_Rule_Proceduralpm
- 2291: Linux cli command xdr_replymsg
- 2292: Linux cli command pcap_perrorpcap
- 2293: Linux cli command libnftables
- 2294: Linux cli command setlocale
- 2295: Linux cli command stailq
- 2296: Linux cli command strdupa
- 2297: Linux cli command svc_getcaller
- 2298: Linux cli command mkstemps
- 2299: Linux cli command Net_DNS_RR_KXpm
- 2300: Linux cli command zip_error_code_zip
- 2301: Linux cli command getrpcbynumber_r
- 2302: Linux cli command isunordered
- 2303: Linux cli command pcrepattern
- 2304: Linux cli command Tk_WidgetDemopm
- 2305: Linux cli command res_query
- 2306: Linux cli command Image_ExifTool_Textpm
- 2307: Linux cli command XtWidgetToApplicationContext
- 2308: Linux cli command HTTP_Responsepm
- 2309: Linux cli command Tkpm
- 2310: Linux cli command pcap_lookupnetpcap
- 2311: Linux cli command XtName
- 2312: Linux cli command ldexpf
- 2313: Linux cli command LIST_NEXT
- 2314: Linux cli command pcap_free_datalinkspcap
- 2315: Linux cli command iswspace
- 2316: Linux cli command Net_Telnetpm
- 2317: Linux cli command Spreadsheet_WriteExcel_Utilitypm
- 2318: Linux cli command X11_Authpm
- 2319: Linux cli command XmbufCreateBuffers
- 2320: Linux cli command Image_ExifTool_CaptureOnepm
- 2321: Linux cli command mkfifoat
- 2322: Linux cli command scandirat
- 2323: Linux cli command fseeko
- 2324: Linux cli command nextafterl
- 2325: Linux cli command XmbufCreateStereoWindow
- 2326: Linux cli command setbuf
- 2327: Linux cli command pthread_cond_broadcast
- 2328: Linux cli command TAILQ_ENTRY
- 2329: Linux cli command XtVaGetValues
- 2330: Linux cli command Regexp_Common_URI_gopherpm
- 2331: Linux cli command wordfree
- 2332: Linux cli command Image_ExifTool_PhotoMechanicpm
- 2333: Linux cli command ts_conf_set
- 2334: Linux cli command WWW_Mechanize_FAQpm
- 2335: Linux cli command vsscanf
- 2336: Linux cli command Image_ExifTool_Realpm
- 2337: Linux cli command log2f
- 2338: Linux cli command Net_DBus_Binding_PendingCallpm
- 2339: Linux cli command Net_DNS_RR_DSpm
- 2340: Linux cli command pcap_offline_filterpcap
- 2341: Linux cli command zip_file_replace
- 2342: Linux cli command fopen
- 2343: Linux cli command nextup
- 2344: Linux cli command remainderf
- 2345: Linux cli command STAILQ_CONCAT
- 2346: Linux cli command XShapeCombineMask
- 2347: Linux cli command Net_DNS_RRpm
- 2348: Linux cli command rintl
- 2349: Linux cli command XtIsSessionShell
- 2350: Linux cli command wcsncasecmp
- 2351: Linux cli command HTTP_Headers_Utilpm
- 2352: Linux cli command Moose_Cookbook_Roles_ApplicationToInstancepm
- 2353: Linux cli command voidtype
- 2354: Linux cli command pcap_get_tstamp_precisionpcap
- 2355: Linux cli command X11_Protocol_Connection_Socketpm
- 2356: Linux cli command xdr_rejected_reply
- 2357: Linux cli command profil
- 2358: Linux cli command wcsnrtombs
- 2359: Linux cli command y1
- 2360: Linux cli command Regexp_Assemblepm
- 2361: Linux cli command Image_ExifTool_APEpm
- 2362: Linux cli command Image_ExifTool_GPSpm
- 2363: Linux cli command ssignal
- 2364: Linux cli command XML_DOM_Nodepm
- 2365: Linux cli command pututxline
- 2366: Linux cli command Try_Tinypm
- 2367: Linux cli command lrand48
- 2368: Linux cli command Net_DNS_RR_CAApm
- 2369: Linux cli command Spreadsheet_ParseExcel_Dumppm
- 2370: Linux cli command ldexpl
- 2371: Linux cli command Net_DNS_Resolver_androidpm
- 2372: Linux cli command rcmd
- 2373: Linux cli command srandom
- 2374: Linux cli command uint8_ttype
- 2375: Linux cli command Moose_Meta_TypeConstraint_Classpm
- 2376: Linux cli command pthread_getspecific
- 2377: Linux cli command Spreadsheet_WriteExcel_Chart_Areapm
- 2378: Linux cli command getpwuid
- 2379: Linux cli command finitef
- 2380: Linux cli command Mail_Field_AddrListpm
- 2381: Linux cli command wcstoumax
- 2382: Linux cli command Moose_Manual_Constructionpm
- 2383: Linux cli command strptime
- 2384: Linux cli command tzset
- 2385: Linux cli command getopt_long_only
- 2386: Linux cli command xdr_void
- 2387: Linux cli command XtError
- 2388: Linux cli command getutent_r
- 2389: Linux cli command Net_DNS_SEC_Keysetpm
- 2390: Linux cli command NetSNMP_OIDpm
- 2391: Linux cli command XtCallbackExclusive
- 2392: Linux cli command XtIsManaged
- 2393: Linux cli command getipnodebyname
- 2394: Linux cli command rpc
- 2395: Linux cli command strdup
- 2396: Linux cli command system
- 2397: Linux cli command XcupQueryVersion
- 2398: Linux cli command Net_DNS_SEC_Digestpm
- 2399: Linux cli command nextdownf
- 2400: Linux cli command pthread_getattr_default_np
- 2401: Linux cli command sigblock
- 2402: Linux cli command strndup
- 2403: Linux cli command wcstoimax
- 2404: Linux cli command Image_ExifTool_AFCPpm
- 2405: Linux cli command fread_unlocked
- 2406: Linux cli command gai_suspend
- 2407: Linux cli command getwchar_unlocked
- 2408: Linux cli command String_CRC32pm
- 2409: Linux cli command Moose_Meta_Method_Destructorpm
- 2410: Linux cli command Sub_Deferpm
- 2411: Linux cli command XtParent
- 2412: Linux cli command nextafter
- 2413: Linux cli command __ppc_mdoio
- 2414: Linux cli command inet_makeaddr
- 2415: Linux cli command vdprintf
- 2416: Linux cli command Net_DBus_Binding_Message_MethodCallpm
- 2417: Linux cli command XtCallbackNonexclusive
- 2418: Linux cli command zip_get_file_comment
- 2419: Linux cli command XtOffsetOf
- 2420: Linux cli command __fwriting
- 2421: Linux cli command setutent
- 2422: Linux cli command getprotobyname_r
- 2423: Linux cli command Moose_Meta_Rolepm
- 2424: Linux cli command setcontext
- 2425: Linux cli command stdio_ext
- 2426: Linux cli command XtRealloc
- 2427: Linux cli command Params_Utilpm
- 2428: Linux cli command File_MimeInfo_Applicationspm
- 2429: Linux cli command getrpcent
- 2430: Linux cli command Net_DNS_RR_DNAMEpm
- 2431: Linux cli command S_ISFIFO
- 2432: Linux cli command zip_error_code_system
- 2433: Linux cli command XtSessionReturnToken
- 2434: Linux cli command floorl
- 2435: Linux cli command pthread_cancel
- 2436: Linux cli command Image_ExifTool_TagNamespm
- 2437: Linux cli command Net_DBus_Test_MockMessagepm
- 2438: Linux cli command Tk_Framepm
- 2439: Linux cli command getutid_r
- 2440: Linux cli command URI_Heuristicpm
- 2441: Linux cli command XtSuperclass
- 2442: Linux cli command time_ttype
- 2443: Linux cli command Tk_overviewpm
- 2444: Linux cli command XtAddRawEventHandler
- 2445: Linux cli command Regexp_Common__supportpm
- 2446: Linux cli command sem_trywait
- 2447: Linux cli command tgammaf
- 2448: Linux cli command Net_Server_Singlepm
- 2449: Linux cli command Moose_Util_TypeConstraintspm
- 2450: Linux cli command NetPacket_IPv6pm
- 2451: Linux cli command __fpurge
- 2452: Linux cli command Image_ExifTool_DarwinCorepm
- 2453: Linux cli command IO_All_Linkpm
- 2454: Linux cli command log2
- 2455: Linux cli command sem_post
- 2456: Linux cli command zip_source_win32w_create
- 2457: Linux cli command isblank
- 2458: Linux cli command Net_DNS_RR_TSIGpm
- 2459: Linux cli command NetPacket_Ethernetpm
- 2460: Linux cli command sethostent
- 2461: Linux cli command sinl
- 2462: Linux cli command Tk_ROTextpm
- 2463: Linux cli command Variable_Magicpm
- 2464: Linux cli command isalpha_l
- 2465: Linux cli command Regexp_Common_URI_telnetpm
- 2466: Linux cli command Image_ExifTool_PrintIMpm
- 2467: Linux cli command putwchar
- 2468: Linux cli command XtVaGetSubvalues
- 2469: Linux cli command MenuPopdown
- 2470: Linux cli command pthread_cond_wait
- 2471: Linux cli command Image_ExifTool_HPpm
- 2472: Linux cli command scalbf
- 2473: Linux cli command Image_ExifTool_DjVupm
- 2474: Linux cli command Regexp_Common_numberpm
- 2475: Linux cli command zip_file_extra_field_delete_by_id
- 2476: Linux cli command Mail_Cappm
- 2477: Linux cli command Net_DBus_Binding_Iteratorpm
- 2478: Linux cli command telldir
- 2479: Linux cli command hcreate
- 2480: Linux cli command IO_All_LWPpm
- 2481: Linux cli command mktemp
- 2482: Linux cli command Net_LibIDN2pm
- 2483: Linux cli command inet_pton
- 2484: Linux cli command pcap_open_livepcap
- 2485: Linux cli command sgetspent_r
- 2486: Linux cli command XtUngrabKeyboard
- 2487: Linux cli command speed_ttype
- 2488: Linux cli command xdrrec_endofrecord
- 2489: Linux cli command zip_encryption_method_supported
- 2490: Linux cli command __ppc_get_timebase_freq
- 2491: Linux cli command Image_ExifTool_iWorkpm
- 2492: Linux cli command psiginfo
- 2493: Linux cli command zip_source_write
- 2494: Linux cli command Net_DNS_RR_TLSApm
- 2495: Linux cli command rexec
- 2496: Linux cli command pthread_setconcurrency
- 2497: Linux cli command shm_open
- 2498: Linux cli command socklen_ttype
- 2499: Linux cli command Net_DBus_Binding_Message_Signalpm
- 2500: Linux cli command Net_DNS_RR_LPpm
- 2501: Linux cli command IO_Socket_Sockspm
- 2502: Linux cli command POD2_JA_Unicode_GCStringpm
- 2503: Linux cli command Net_DNS_Resolver_UNIXpm
- 2504: Linux cli command rewind
- 2505: Linux cli command XtVaCreateManagedWidget
- 2506: Linux cli command log10l
- 2507: Linux cli command ruserok_af
- 2508: Linux cli command XtVaCreatePopupShell
- 2509: Linux cli command get_avphys_pages
- 2510: Linux cli command grantpt
- 2511: Linux cli command Image_ExifTool_Unknownpm
- 2512: Linux cli command Tk_Mwmpm
- 2513: Linux cli command wcsnlen
- 2514: Linux cli command xdr_u_long
- 2515: Linux cli command pcap_open_dead_with_tstamp_precisionpcap
- 2516: Linux cli command setjmp
- 2517: Linux cli command Net_DBus_ASyncReplypm
- 2518: Linux cli command Tk_Treepm
- 2519: Linux cli command XML_PatAct_ToObjectspm
- 2520: Linux cli command vfscanf
- 2521: Linux cli command Image_ExifTool_Flashpm
- 2522: Linux cli command MailToolspm
- 2523: Linux cli command Net_DNS_RR_SOApm
- 2524: Linux cli command frexpl
- 2525: Linux cli command Net_Server_Proto_UNIXpm
- 2526: Linux cli command pthread_cond_init
- 2527: Linux cli command Tk_Derivedpm
- 2528: Linux cli command Image_ExifTool_CanonRawpm
- 2529: Linux cli command Net_DNS_RR_NSEC3PARAMpm
- 2530: Linux cli command XtAppMainLoop
- 2531: Linux cli command j0
- 2532: Linux cli command Math_Random_ISAACpm
- 2533: Linux cli command zip_get_error
- 2534: Linux cli command mbstowcs
- 2535: Linux cli command ttyname_r
- 2536: Linux cli command intmax_ttype
- 2537: Linux cli command pow
- 2538: Linux cli command Image_ExifTool_InDesignpm
- 2539: Linux cli command in_addr_ttype
- 2540: Linux cli command Moose_Meta_TypeConstraint_Rolepm
- 2541: Linux cli command Net_SSH2_Filepm
- 2542: Linux cli command zip_add
- 2543: Linux cli command logwtmp
- 2544: Linux cli command Moose_Meta_TypeCoercionpm
- 2545: Linux cli command getwchar
- 2546: Linux cli command optind
- 2547: Linux cli command pthread_attr_setinheritsched
- 2548: Linux cli command Net_Server_SIGpm
- 2549: Linux cli command XmbufGetScreenInfo
- 2550: Linux cli command Image_ExifTool_RIFFpm
- 2551: Linux cli command sincos
- 2552: Linux cli command freehostent
- 2553: Linux cli command qsort_r
- 2554: Linux cli command tdelete
- 2555: Linux cli command regcomp
- 2556: Linux cli command pthread_mutex_trylock
- 2557: Linux cli command XtReservePropertyAtom
- 2558: Linux cli command Image_ExifTool_JVCpm
- 2559: Linux cli command Net_DNS_RR_TKEYpm
- 2560: Linux cli command Image_ExifTool_OpenEXRpm
- 2561: Linux cli command Tk_Submethodspm
- 2562: Linux cli command NetPacket_IGMPpm
- 2563: Linux cli command va_arg
- 2564: Linux cli command Image_ExifTool_ZISRAWpm
- 2565: Linux cli command Regexp_Common_URI_RFC1738pm
- 2566: Linux cli command res_querydomain
- 2567: Linux cli command sin
- 2568: Linux cli command Image_ExifTool_FLIFpm
- 2569: Linux cli command warn
- 2570: Linux cli command Image_ExifTool_H264pm
- 2571: Linux cli command fts_close
- 2572: Linux cli command wmemchr
- 2573: Linux cli command __freadable
- 2574: Linux cli command Moopm
- 2575: Linux cli command pthread_attr_getguardsize
- 2576: Linux cli command sem_init
- 2577: Linux cli command XtMoveWidget
- 2578: Linux cli command getservbyname_r
- 2579: Linux cli command significandf
- 2580: Linux cli command Win32_DBIODBCpm
- 2581: Linux cli command y0
- 2582: Linux cli command zip_error_get_sys_type
- 2583: Linux cli command wcspbrk
- 2584: Linux cli command xdr_array
- 2585: Linux cli command HTML_PullParserpm
- 2586: Linux cli command Image_ExifTool_IPTCpm
- 2587: Linux cli command Net_DNS_RR_NAPTRpm
- 2588: Linux cli command Net_DNS_RR_ZONEMDpm
- 2589: Linux cli command pcap_activatepcap
- 2590: Linux cli command xdr_opaque
- 2591: Linux cli command XtVaCreateWidget
- 2592: Linux cli command Image_ExifTool_Validatepm
- 2593: Linux cli command stdarg
- 2594: Linux cli command ulckpwdf
- 2595: Linux cli command TIMEVAL_TO_TIMESPEC
- 2596: Linux cli command Tk_ErrorDialogpm
- 2597: Linux cli command XtAppPeekEvent
- 2598: Linux cli command putpwent
- 2599: Linux cli command sigaddset
- 2600: Linux cli command siglongjmp
- 2601: Linux cli command XtCalloc
- 2602: Linux cli command XtSetSelectionTimeout
- 2603: Linux cli command XtConvert
- 2604: Linux cli command zip_source_read
- 2605: Linux cli command iswgraph
- 2606: Linux cli command Net_Server_PreForkSimplepm
- 2607: Linux cli command Tk_Tablepm
- 2608: Linux cli command XtAppGetSelectionTimeout
- 2609: Linux cli command URI_URLpm
- 2610: Linux cli command getaliasent
- 2611: Linux cli command Moose_Cookbook_Basics_DateTime_ExtendingNonMooseParentpm
- 2612: Linux cli command perror
- 2613: Linux cli command ts_read_mt
- 2614: Linux cli command xdr_bytes
- 2615: Linux cli command IO_Uncompress_Brotlipm
- 2616: Linux cli command pthread_attr_init
- 2617: Linux cli command ntp_adjtime
- 2618: Linux cli command malloc_trim
- 2619: Linux cli command popen
- 2620: Linux cli command Xevi
- 2621: Linux cli command setnetent
- 2622: Linux cli command wcscmp
- 2623: Linux cli command login_tty
- 2624: Linux cli command zip_source_error
- 2625: Linux cli command Image_ExifTool_KyoceraRawpm
- 2626: Linux cli command getw
- 2627: Linux cli command remque
- 2628: Linux cli command timezone
- 2629: Linux cli command wctomb
- 2630: Linux cli command getpwnam
- 2631: Linux cli command regerror
- 2632: Linux cli command XtReleasePropertyAtom
- 2633: Linux cli command getgrouplist
- 2634: Linux cli command Image_ExifTool_Redpm
- 2635: Linux cli command va_listtype
- 2636: Linux cli command XtAppGetExitFlag
- 2637: Linux cli command Moose_Meta_Attribute_Native_Trait_Hashpm
- 2638: Linux cli command Net_Server_Protopm
- 2639: Linux cli command setpwent
- 2640: Linux cli command zip_file_add
- 2641: Linux cli command zip_source
- 2642: Linux cli command initstate_r
- 2643: Linux cli command Mail_Addresspm
- 2644: Linux cli command mcheck
- 2645: Linux cli command Moose_Manual_Supportpm
- 2646: Linux cli command Net_DNS_RR_DNSKEYpm
- 2647: Linux cli command pcap_geterrpcap
- 2648: Linux cli command Tk_Errorpm
- 2649: Linux cli command mq_unlink
- 2650: Linux cli command qgcvt
- 2651: Linux cli command zip_source_zip
- 2652: Linux cli command Moose_Meta_TypeCoercion_Unionpm
- 2653: Linux cli command revtwowayam
- 2654: Linux cli command STAILQ_HEAD_INITIALIZER
- 2655: Linux cli command HTML_Form_SubmitInputpm
- 2656: Linux cli command Image_ExifTool_WriteQuickTimepm
- 2657: Linux cli command zip_file_set_encryption
- 2658: Linux cli command Net_DBus_BaseObjectpm
- 2659: Linux cli command Net_SSLeaypm
- 2660: Linux cli command ts_open
- 2661: Linux cli command tanh
- 2662: Linux cli command ualarm
- 2663: Linux cli command zip_dir_add
- 2664: Linux cli command XtOverrideTranslations
- 2665: Linux cli command Net_DNS_RR_SPFpm
- 2666: Linux cli command strtold
- 2667: Linux cli command XtIsRealized
- 2668: Linux cli command XtRemoveActionHook
- 2669: Linux cli command IO_Socket_SSL_Interceptpm
- 2670: Linux cli command qfcvt_r
- 2671: Linux cli command Regexp_Common_listpm
- 2672: Linux cli command ts_config
- 2673: Linux cli command XtInstallAccelerators
- 2674: Linux cli command ntp_gettime
- 2675: Linux cli command pcap_filepcap
- 2676: Linux cli command Sub_Exporter_Utilpm
- 2677: Linux cli command XtCheckSubclass
- 2678: Linux cli command zip_source_seek_write
- 2679: Linux cli command getutxent
- 2680: Linux cli command Image_ExifTool_FotoStationpm
- 2681: Linux cli command memset
- 2682: Linux cli command MB_CUR_MAX
- 2683: Linux cli command fpclassify
- 2684: Linux cli command Moose_Meta_TypeConstraint_DuckTypepm
- 2685: Linux cli command open_wmemstream
- 2686: Linux cli command TAILQ_HEAD_INITIALIZER
- 2687: Linux cli command Tk_Widgetpm
- 2688: Linux cli command Net_DNS_RR_URIpm
- 2689: Linux cli command ldiv_ttype
- 2690: Linux cli command pthread_spin_init
- 2691: Linux cli command Image_ExifTool_ID3pm
- 2692: Linux cli command localeconv
- 2693: Linux cli command XtAppCreateShell
- 2694: Linux cli command XtWindowOfObject
- 2695: Linux cli command fmodl
- 2696: Linux cli command pcap_datalink_val_to_descriptionpcap
- 2697: Linux cli command Spreadsheet_WriteExcel_Chart_Externalpm
- 2698: Linux cli command iswalnum
- 2699: Linux cli command tcgetpgrp
- 2700: Linux cli command Tk_Tcl-perlpm
- 2701: Linux cli command unsetenv
- 2702: Linux cli command zip_set_file_comment
- 2703: Linux cli command Number_Bytes_Humanpm
- 2704: Linux cli command lconvtype
- 2705: Linux cli command XtGetErrorDatabaseText
- 2706: Linux cli command Image_ExifTool_PostScriptpm
- 2707: Linux cli command IO_Socket_INET6pm
- 2708: Linux cli command sigeventtype
- 2709: Linux cli command TAILQ_PREV
- 2710: Linux cli command MRO_Compatpm
- 2711: Linux cli command zip_error_strerror
- 2712: Linux cli command Image_ExifTool_PanasonicRawpm
- 2713: Linux cli command zip_source_function
- 2714: Linux cli command Image_ExifTool_LIFpm
- 2715: Linux cli command Tk_Panepm
- 2716: Linux cli command TAILQ_REMOVE
- 2717: Linux cli command namespace_cleanpm
- 2718: Linux cli command pcap_injectpcap
- 2719: Linux cli command Sub_Exporter_Cookbookpm
- 2720: Linux cli command timercmp
- 2721: Linux cli command XtCreateWindow
- 2722: Linux cli command pthread_setname_np
- 2723: Linux cli command Image_ExifTool_BigTIFFpm
- 2724: Linux cli command getnetent_r
- 2725: Linux cli command Image_ExifTool_MakerNotespm
- 2726: Linux cli command Image_ExifTool_Lang_japm
- 2727: Linux cli command inet_addr
- 2728: Linux cli command LIST_HEAD
- 2729: Linux cli command sigfillset
- 2730: Linux cli command Tk_callbackspm
- 2731: Linux cli command Types_Serialiserpm
- 2732: Linux cli command wcscasecmp
- 2733: Linux cli command modfl
- 2734: Linux cli command Net_DNS_RR_RTpm
- 2735: Linux cli command Spreadsheet_ParseExcel_SaveParser_Workbookpm
- 2736: Linux cli command XtLastEventProcessed
- 2737: Linux cli command Moose_Meta_TypeConstraint_Parameterizedpm
- 2738: Linux cli command XtAppPending
- 2739: Linux cli command roundf
- 2740: Linux cli command Net_DNS_Parameterspm
- 2741: Linux cli command sigemptyset
- 2742: Linux cli command mrand48_r
- 2743: Linux cli command Image_ExifTool_APP12pm
- 2744: Linux cli command killpg
- 2745: Linux cli command towlower
- 2746: Linux cli command Image_ExifTool_PDFpm
- 2747: Linux cli command pthread_getcpuclockid
- 2748: Linux cli command tailq
- 2749: Linux cli command Moose_Meta_TypeConstraint_Registrypm
- 2750: Linux cli command pid_ttype
- 2751: Linux cli command mq_close
- 2752: Linux cli command XtManageChild
- 2753: Linux cli command XtVaCreateArgsList
- 2754: Linux cli command zip_file_set_external_attributes
- 2755: Linux cli command Image_ExifTool_Jpeg2000pm
- 2756: Linux cli command gethostbyaddr
- 2757: Linux cli command Image_ExifTool_FLACpm
- 2758: Linux cli command gai_error
- 2759: Linux cli command strfmon
- 2760: Linux cli command xencrypt
- 2761: Linux cli command zip_file_strerror
- 2762: Linux cli command Image_ExifTool_WriteExifpm
- 2763: Linux cli command imaxdiv_ttype
- 2764: Linux cli command mtrace
- 2765: Linux cli command Net_DNS_RR_OPENPGPKEYpm
- 2766: Linux cli command slist
- 2767: Linux cli command iruserok
- 2768: Linux cli command MB_LEN_MAX
- 2769: Linux cli command PadWalkerpm
- 2770: Linux cli command Image_ExifTool_Shiftpm
- 2771: Linux cli command SIMPLEQ_NEXT
- 2772: Linux cli command Image_ExifTool_Olympuspm
- 2773: Linux cli command setbuffer
- 2774: Linux cli command XShmQueryExtension
- 2775: Linux cli command Net_DBus_Objectpm
- 2776: Linux cli command pthread_testcancel
- 2777: Linux cli command Regexp_Common_URI_faxpm
- 2778: Linux cli command sscanf
- 2779: Linux cli command timeradd
- 2780: Linux cli command Image_ExifTool_Charsetpm
- 2781: Linux cli command regmatch_ttype
- 2782: Linux cli command MAX
- 2783: Linux cli command Moose_Meta_Role_Application_ToClasspm
- 2784: Linux cli command pthread_attr_setschedparam
- 2785: Linux cli command XML_DOM_Textpm
- 2786: Linux cli command XML_Parserpm
- 2787: Linux cli command getpt
- 2788: Linux cli command memrchr
- 2789: Linux cli command XShapeInputSelected
- 2790: Linux cli command Moose_Cookbook_Legacy_Debugging_BaseClassReplacementpm
- 2791: Linux cli command pcap_setdirectionpcap
- 2792: Linux cli command xdr_inline
- 2793: Linux cli command printf_va_arg_functiontype
- 2794: Linux cli command strtof
- 2795: Linux cli command timer_ttype
- 2796: Linux cli command Net_SSH2_KnownHostspm
- 2797: Linux cli command Tk_MainWindowpm
- 2798: Linux cli command WWW_Mechanize_Examplespm
- 2799: Linux cli command Text_Globpm
- 2800: Linux cli command XtInstallAllAccelerators
- 2801: Linux cli command zip_source_buffer_fragment_create
- 2802: Linux cli command XtAppSetErrorMsgHandler
- 2803: Linux cli command XtCallActionProc
- 2804: Linux cli command fmod
- 2805: Linux cli command forkam
- 2806: Linux cli command getwc
- 2807: Linux cli command rtime
- 2808: Linux cli command S_ISCHR
- 2809: Linux cli command Tk_804deltapm
- 2810: Linux cli command Net_DNS_RR_SVCBpm
- 2811: Linux cli command updwtmpx
- 2812: Linux cli command Image_ExifTool_QuickTimeStreampm
- 2813: Linux cli command Regexp_Common_URI_poppm
- 2814: Linux cli command Tk_Spinboxpm
- 2815: Linux cli command tmtype
- 2816: Linux cli command Moose_Cookbook_Meta_Labeled_AttributeTraitpm
- 2817: Linux cli command pthread_mutexattr_gettype
- 2818: Linux cli command Regexp_IPv6pm
- 2819: Linux cli command TAILQ_NEXT
- 2820: Linux cli command XdbeQueryExtension
- 2821: Linux cli command Jcode_Nihongopm
- 2822: Linux cli command Net_DNS_RR_CERTpm
- 2823: Linux cli command iswcntrl
- 2824: Linux cli command lrand48_r
- 2825: Linux cli command XtAppSetWarningMsgHandler
- 2826: Linux cli command res_nmkquery
- 2827: Linux cli command Image_ExifTool_Scaladopm
- 2828: Linux cli command le16toh
- 2829: Linux cli command pcap_open_deadpcap
- 2830: Linux cli command getspnam_r
- 2831: Linux cli command setservent
- 2832: Linux cli command powerof2
- 2833: Linux cli command signbit
- 2834: Linux cli command XauLockAuth
- 2835: Linux cli command gnu_dev_minor
- 2836: Linux cli command Image_ExifTool_PPMpm
- 2837: Linux cli command XML_Twigpm
- 2838: Linux cli command wcwidth
- 2839: Linux cli command __ppc_set_ppr_low
- 2840: Linux cli command pthread_mutexattr_getpshared
- 2841: Linux cli command Image_ExifTool_MIEUnitspm
- 2842: Linux cli command Image_ExifTool_PCXpm
- 2843: Linux cli command log2l
- 2844: Linux cli command Tie_IxHashpm
- 2845: Linux cli command pcap_dump_openpcap
- 2846: Linux cli command pow10f
- 2847: Linux cli command Tk_fileeventpm
- 2848: Linux cli command Xmbuf
- 2849: Linux cli command putc_unlocked
- 2850: Linux cli command zip_file_get_comment
- 2851: Linux cli command HTML_Treepm
- 2852: Linux cli command XtInsertEventHandler
- 2853: Linux cli command getrpcent_r
- 2854: Linux cli command XtNameToWidget
- 2855: Linux cli command LWP_ConnCachepm
- 2856: Linux cli command va_end
- 2857: Linux cli command getpass
- 2858: Linux cli command Image_ExifTool_Lang_fipm
- 2859: Linux cli command Spreadsheet_ParseExcel_SaveParserpm
- 2860: Linux cli command pthread_attr_getschedparam
- 2861: Linux cli command Image_ExifTool_Fixuppm
- 2862: Linux cli command llrintl
- 2863: Linux cli command Moose_Manual_Delegationpm
- 2864: Linux cli command XtErrorMsg
- 2865: Linux cli command getenv
- 2866: Linux cli command Image_ExifTool_Torrentpm
- 2867: Linux cli command lcong48
- 2868: Linux cli command Spreadsheet_WriteExcel_BIFFwriterpm
- 2869: Linux cli command isatty
- 2870: Linux cli command pcap_fopen_offline_with_tstamp_precisionpcap
- 2871: Linux cli command Tk_DirTreepm
- 2872: Linux cli command Image_ExifTool_Shortcutspm
- 2873: Linux cli command Moose_Cookbook_Meta_WhyMetapm
- 2874: Linux cli command Image_ExifTool_Lang_nlpm
- 2875: Linux cli command ldexp
- 2876: Linux cli command longjmp
- 2877: Linux cli command pthread_getattr_np
- 2878: Linux cli command Moose_Manual_FAQpm
- 2879: Linux cli command gethostent
- 2880: Linux cli command Image_ExifTool_Ricohpm
- 2881: Linux cli command Moose_Meta_Role_Methodpm
- 2882: Linux cli command remquof
- 2883: Linux cli command isxdigit
- 2884: Linux cli command Moose_Cookbook_Snack_Typespm
- 2885: Linux cli command XtVaGetApplicationResources
- 2886: Linux cli command Tk_sendpm
- 2887: Linux cli command zip_open
- 2888: Linux cli command mq_setattr
- 2889: Linux cli command HTML_HeadParserpm
- 2890: Linux cli command PA_DOUBLEconst
- 2891: Linux cli command islower
- 2892: Linux cli command Net_DNS_RR_CSYNCpm
- 2893: Linux cli command re_exec
- 2894: Linux cli command recno
- 2895: Linux cli command sigset_ttype
- 2896: Linux cli command fminf
- 2897: Linux cli command program_invocation_name
- 2898: Linux cli command Tk_compositepm
- 2899: Linux cli command File_UserDirspm
- 2900: Linux cli command intN_ttype
- 2901: Linux cli command Tk_afterpm
- 2902: Linux cli command ts_read_raw
- 2903: Linux cli command pthread_cleanup_push_defer_np
- 2904: Linux cli command tgamma
- 2905: Linux cli command wcsspn
- 2906: Linux cli command HTTP_DAV_Responsepm
- 2907: Linux cli command getprotobynumber
- 2908: Linux cli command swapcontext
- 2909: Linux cli command XdbeFreeVisualInfo
- 2910: Linux cli command putenv
- 2911: Linux cli command getcontext
- 2912: Linux cli command readlinereadline
1 - Linux cli command seed48_r
NAME 🖥️ seed48_r 🖥️
generate uniformly distributed pseudo-random numbers reentrantly
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
int drand48_r(struct drand48_data *restrict buffer,
double *restrict result);
int erand48_r(unsigned short xsubi[3],
struct drand48_data *restrict buffer,
double *restrict result);
int lrand48_r(struct drand48_data *restrict buffer,
long *restrict result);
int nrand48_r(unsigned short xsubi[3],
struct drand48_data *restrict buffer,
long *restrict result);
int mrand48_r(struct drand48_data *restrict buffer,
long *restrict result);
int jrand48_r(unsigned short xsubi[3],
struct drand48_data *restrict buffer,
long *restrict result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer);
int lcong48_r(unsigned short param[7], struct drand48_data *buffer);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
All functions shown above:
/* glibc >= 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
DESCRIPTION
These functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer.
Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().
RETURN VALUE
The return value is 0.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r() | Thread safety | MT-Safe race:buffer |
STANDARDS
GNU.
SEE ALSO
drand48(3), rand(3), random(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
2 - Linux cli command XShapeGetRectangles
NAME 🖥️ XShapeGetRectangles 🖥️
X nonrectangular shape functions
SYNTAX
#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
Display *dpy,
int *event_basep,
int *error_basep);
Status XShapeQueryVersion (
Display *dpy,
int *major_versionp,
int *minor_versionp);
void XShapeCombineRegion (
Display *dpy,
Window dest,
int destKind,
int xOff,
int yOff,
struct _XRegion *r,
int op);
void XShapeCombineRectangles (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
XRectangle *rects,
int n_rects,
int op,
int ordering);
void XShapeCombineMask (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
Pixmap src,
int op);
void XShapeCombineShape (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
Pixmap src,
int srcKind,
int op);
void XShapeOffsetShape (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff);
Status XShapeQueryExtents (
Display *dpy,
Window window,
int *bShaped,
int *xbs,
int *ybs,
unsigned int *wbs,
unsigned int *hbs,
int *cShaped,
int *xcs,
int *ycs,
unsigned int *wcs,
unsigned int *hcs);
void XShapeSelectInput (
Display *dpy,
Window window,
unsigned longmask);
unsigned long XShapeInputSelected (
Display *dpy,
Window window);
XRectangle *XShapeGetRectangles (
Display *dpy,
Window window,
int kind,
int *count,
int *ordering);
STRUCTURES
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* window of event */
int kind; /* ShapeBounding or ShapeClip */
int x, y; /* extents of new region */
unsigned width, height;
Time time; /* server timestamp when region changed */
Bool shaped; /* true if the region exists */
} XShapeEvent;
DESCRIPTION
The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.
PREDEFINED VALUES
Operations:
ShapeSet ShapeUnion ShapeIntersect ShapeSubtract ShapeInvert
Shape Kinds:
ShapeBounding ShapeClip
Event defines:
ShapeNotifyMask ShapeNotify
BUGS
This manual page needs a lot more work.
SEE ALSO
X11 Nonrectangular Window Shape Extension
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
3 - Linux cli command Moose_Cookbook_Legacy_Table_ClassMetaclasspm
NAME 🖥️ Moose_Cookbook_Legacy_Table_ClassMetaclasspm 🖥️
Adding a “table” attribute to the metaclass
VERSION
version 2.2207
SYNOPSIS
package MyApp::Meta::Class; use Moose; extends Moose::Meta::Class; has table => ( is => rw, isa => Str, );
DESCRIPTION
WARNING: Subclassing metaclasses (as opposed to providing metaclass traits) is strongly discouraged. This recipe is provided solely for reference when encountering older code that does this.
In this recipe, we’ll create a new metaclass which has a “table” attribute. This metaclass is for classes associated with a DBMS table, as one might do for an ORM.
In this example, the table name is just a string, but in a real ORM the table might be an object describing the table.
THE METACLASS
This really is as simple as the recipe “SYNOPSIS” shows. The trick is getting your classes to use this metaclass, and providing some sort of sugar for declaring the table. This is covered in Moose::Cookbook::Extending::Recipe2, which shows how to make a module like Moose.pm
itself, with sugar like has_table()
.
Using this Metaclass in Practice
Accessing this new table
attribute is quite simple. Given a class named MyApp::User
, we could simply write the following:
my $table = MyApp::User->meta->table;
As long as MyApp::User
has arranged to use MyApp::Meta::Class
as its metaclass, this method call just works. If we want to be more careful, we can check the metaclass’s class:
$table = MyApp::User->meta->table if MyApp::User->meta->isa(MyApp::Meta::Class);
CONCLUSION
Creating custom metaclass is trivial. Using it is a little harder, and is covered in other recipes. We will also talk about applying traits to a class metaclass, which is a more flexible and cooperative implementation.
SEE ALSO
Moose::Cookbook::Meta::Recipe5 - The “table” attribute implemented as a metaclass trait
Moose::Cookbook::Extending::Recipe2 - Acting like Moose.pm and providing sugar Moose-style
AUTHORS
Stevan Little <[email protected]>
Dave Rolsky <[email protected]>
Jesse Luehrs <[email protected]>
Shawn M Moore <[email protected]>
יובל קוג’מן (Yuval Kogman) <[email protected]>
Karen Etheridge <[email protected]>
Florian Ragwitz <[email protected]>
Hans Dieter Pearcey <[email protected]>
Chris Prather <[email protected]>
Matt S Trout <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
4 - Linux cli command SIMPLEQ_ENTRY
NAME 🖥️ SIMPLEQ_ENTRY 🖥️
implementation of a singly linked tail queue
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);
Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.
DESCRIPTION
These macros define and operate on singly linked tail queues.
In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().
Creation
A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:
STAILQ_HEAD(HEADNAME, TYPE) head;
where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:
struct HEADNAME *headp;
(The names head and headp are user selectable.)
STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.
STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.
STAILQ_INIT() initializes the tail queue referenced by head.
STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.
Insertion
STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.
STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.
STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.
Traversal
STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.
STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.
STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.
Removal
STAILQ_REMOVE() removes the element elm from the tail queue.
STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.
Other features
STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.
RETURN VALUE
STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.
STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.
STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.
VERSIONS
Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().
BUGS
STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.
STANDARDS
BSD.
HISTORY
4.4BSD.
EXAMPLES
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
int data;
STAILQ_ENTRY(entry) entries; /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct stailhead head; /* Singly linked tail queue
head */
STAILQ_INIT(&head); /* Initialize the queue */
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
STAILQ_INSERT_HEAD(&head, n1, entries);
n1 = malloc(sizeof(struct entry)); /* Insert at the tail */
STAILQ_INSERT_TAIL(&head, n1, entries);
n2 = malloc(sizeof(struct entry)); /* Insert after */
STAILQ_INSERT_AFTER(&head, n1, n2, entries);
STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
free(n2);
n3 = STAILQ_FIRST(&head);
STAILQ_REMOVE_HEAD(&head, entries); /* Deletion from the head */
free(n3);
n1 = STAILQ_FIRST(&head);
n1->data = 0;
for (unsigned int i = 1; i < 5; i++) {
n1 = malloc(sizeof(struct entry));
STAILQ_INSERT_HEAD(&head, n1, entries);
n1->data = i;
}
/* Forward traversal */
STAILQ_FOREACH(np, &head, entries)
printf("%i
“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }
SEE ALSO
insque(3), queue(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
5 - Linux cli command wctype
NAME 🖥️ wctype 🖥️
wide-character classification
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <wctype.h>
wctype_t wctype(const char *name);
DESCRIPTION
The wctype_t type represents a property which a wide character may or may not have. In other words, it represents a class of wide characters. This type’s nature is implementation-dependent, but the special value (wctype_t) 0 denotes an invalid property. Nonzero wctype_t values can be passed to the iswctype(3) function to actually test whether a given wide character has the property.
The wctype() function returns a property, given by its name. The set of valid names depends on the LC_CTYPE category of the current locale, but the following names are valid in all locales.
"alnum" - realizes the isalnum(3) classification function
"alpha" - realizes the isalpha(3) classification function
"blank" - realizes the isblank(3) classification function
"cntrl" - realizes the iscntrl(3) classification function
"digit" - realizes the isdigit(3) classification function
"graph" - realizes the isgraph(3) classification function
"lower" - realizes the islower(3) classification function
"print" - realizes the isprint(3) classification function
"punct" - realizes the ispunct(3) classification function
"space" - realizes the isspace(3) classification function
"upper" - realizes the isupper(3) classification function
"xdigit" - realizes the isxdigit(3) classification function
RETURN VALUE
The wctype() function returns a property descriptor if the name is valid. Otherwise, it returns (wctype_t) 0.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
wctype() | Thread safety | MT-Safe locale |
STANDARDS
C11, POSIX.1-2008.
HISTORY
POSIX.1-2001, C99.
NOTES
The behavior of wctype() depends on the LC_CTYPE category of the current locale.
SEE ALSO
iswctype(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
6 - Linux cli command lgamma
NAME 🖥️ lgamma 🖥️
log gamma function
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double lgamma(double x);
float lgammaf(float x);
long double lgammal(long double x);
double lgamma_r(double x, int *signp);
float lgammaf_r(float x, int *signp);
long double lgammal_r(long double x, int *signp);
extern int signgam;
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
lgamma():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
lgammaf(), lgammal():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
lgamma_r(), lgammaf_r(), lgammal_r():
/* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
signgam:
_XOPEN_SOURCE
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
For the definition of the Gamma function, see tgamma(3).
The lgamma(), lgammaf(), and lgammal() functions return the natural logarithm of the absolute value of the Gamma function. The sign of the Gamma function is returned in the external integer signgam declared in <math.h>. It is 1 when the Gamma function is positive or zero, -1 when it is negative.
Since using a constant location signgam is not thread-safe, the functions lgamma_r(), lgammaf_r(), and lgammal_r() have been introduced; they return the sign via the argument signp.
RETURN VALUE
On success, these functions return the natural logarithm of Gamma(x).
If x is a NaN, a NaN is returned.
If x is 1 or 2, +0 is returned.
If x is positive infinity or negative infinity, positive infinity is returned.
If x is a nonpositive integer, a pole error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.
If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.
ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions.
The following errors can occur:
Pole error: x is a nonpositive integer
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.
Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.
STANDARDS
lgamma()
lgammaf()
lgammal()
C11, POSIX.1-2008.
signgam
POSIX.1-2008.
lgamma_r()
lgammaf_r()
lgammal_r()
None.
HISTORY
lgamma()
lgammaf()
lgammal()
C99, POSIX.1-2001.
signgam
POSIX.1-2001.
lgamma_r()
lgammaf_r()
lgammal_r()
None.
BUGS
In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM; instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.
SEE ALSO
tgamma(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
7 - Linux cli command malloc_hook
NAME 🖥️ malloc_hook 🖥️
malloc debugging variables (DEPRECATED)
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <malloc.h>
void *(*volatile __malloc_hook)(size_t size, const void *caller);
void *(*volatile __realloc_hook)(void *ptr, size_t size,
const void *caller);
void *(*volatile __memalign_hook)(size_t alignment, size_t size,
const void *caller);
void (*volatile __free_hook)(void *ptr, const void *caller);
void (*__malloc_initialize_hook)(void);
void (*volatile __after_morecore_hook)(void);
DESCRIPTION
The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example.
The variable __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:
void (*__malloc_initialize_hook)(void) = my_init_hook;
Now the function my_init_hook() can do the initialization of all hooks.
The four functions pointed to by __malloc_hook, __realloc_hook, __memalign_hook, __free_hook have a prototype like the functions malloc(3), realloc(3), memalign(3), free(3), respectively, except that they have a final argument caller that gives the address of the caller of malloc(3), etc.
The variable __after_morecore_hook points at a function that is called each time after sbrk(2) was asked for more memory.
STANDARDS
GNU.
NOTES
The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. From glibc 2.24 onwards, the __malloc_initialize_hook variable has been removed from the API, and from glibc 2.34 onwards, all the hook variables have been removed from the API. Programmers should instead preempt calls to the relevant functions by defining and exporting malloc(), free(), realloc(), and calloc().
EXAMPLES
Here is a short example of how to use these variables.
#include <stdio.h>
#include <malloc.h>
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
static void
my_init_hook(void)
{
old_malloc_hook = __malloc_hook;
__malloc_hook = my_malloc_hook;
}
static void *
my_malloc_hook(size_t size, const void *caller)
{
void *result;
/* Restore all old hooks */
__malloc_hook = old_malloc_hook;
/* Call recursively */
result = malloc(size);
/* Save underlying hooks */
old_malloc_hook = __malloc_hook;
/* printf() might call malloc(), so protect it too */
printf("malloc(%zu) called from %p returns %p
“, size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; return result; }
SEE ALSO
mallinfo(3), malloc(3), mcheck(3), mtrace(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
8 - Linux cli command XtSessionGetToken
NAME 🖥️ XtSessionGetToken 🖥️
token management for checkpointing
SYNTAX
#include <X11/Intrinsic.h>
XtCheckpointToken XtSessionGetToken(Widget w);
void XtSessionReturnToken(XtCheckpointToken token);
ARGUMENTS
- Specifies the session widget.
token
Specifies the token to be returned.
DESCRIPTION
The XtSessionGetToken function will return NULL if the checkpoint operation instigated by the session manager is not currently under way.
To indicate the completion of a deferred save operation and to return the checkpoint token use XtSessionReturnToken.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
9 - Linux cli command zip_source_function_create
libzip (-lzip)
The functions
and
creates a zip source from the user-provided function
which must be of the following type:
or
are used for reporting errors and can be
When called by the library, the first argument is the
argument supplied to the function. The next two arguments are a buffer
of size
when data is passed in or expected to be returned, or else
and 0. The last argument,
specifies which action the function should perform.
Depending on the uses, there are three useful sets of commands to be supported by a
Providing streamed data (for file data added to archives). Must support
and
Same as previous, but from a source allowing reading from arbitrary offsets (also for read-only zip archive). Must additionally support
and
Same as previous, but additionally allowing writing (also for writable zip archives). Must additionally support
and
Return 1 if an empty source should be accepted as a valid zip archive. This is the default if this command is not supported by a source. File system backed sources should return 0.
Prepare the source for writing. Use this to create any temporary file(s).
Prepare the source for writing, keeping the first
bytes of the original file. Only implement this command if it is more efficient than copying the data, and if it does not destructively overwrite the original file (you still have to be able to execute
The next write should happen at byte
Reading is done.
Finish writing to the source. Replace the original data with the newly written data. Clean up temporary files or internal buffers. Subsequently opening and reading from the source should return the newly written data.
Get error information.
points to an array of two ints, which should be filled with the libzip error code and the corresponding system error code for the error that occurred. See
for details on the error codes. If the source stores error information in a zip_error_t, use
and return its return value. Otherwise, return 2 * sizeof(int).
Clean up and free all resources, including
The callback function will not be called again.
Provide information about various data. Then the data should be put in the appropriate entry in the passed
argument, and the appropriate
value must be or’ed into the
member to denote that the corresponding data has been provided. A
structure can be initialized using
If a file is a plaintext file in ASCII. Can be used by extraction tools to automatically convert line endings (part of the interal file attributes). Member
flag
The general purpose bit flag in the zip in the local and central directory headers contain information about the compression method. Member
and
to denote which members have been set; flag
The external file attributes (usually operating system-specific). Member
flag
A minimum version needed required to unpack this entry (in the usual “major * 10 + minor” format). Member
flag
One of the operating systems as defined by the
variables (see
This value affects the interpretation of the external file attributes. Member
flag
Prepare for reading.
Read data into the buffer
of size
Return the number of bytes placed into
on success, and zero for end-of-file.
Remove the underlying file. This is called if a zip archive is empty when closed.
Abort writing to the source. Discard written data. Clean up temporary files or internal buffers. Subsequently opening and reading from the source should return the original data.
Specify position to read next byte from, like
Use
to decode the arguments into the following struct:
struct zip_source_args_seek { zip_int64_t offset; int whence; };
If the size of the source’s data is known, use
to validate the arguments and compute the new offset.
Specify position to write next byte to, like
See
for details.
Get meta information for the input data.
points to an allocated
which should be initialized using
and then filled in.
For uncompressed, unencrypted data, all information is optional. However, fill in as much information as is readily available.
If the data is compressed,
and
must be filled in.
If the data is encrypted,
and
must be filled in.
Information only available after the source has been read (e.g., size) can be omitted in an earlier call.
may be called with this argument even after being called with
Return sizeof(struct zip_stat) on success.
Return bitmap specifying which commands are supported. Use
If this command is not implemented, the source is assumed to be a read source without seek support.
Return the current read offset in the source, like
Return the current write offset in the source, like
Write data to the source. Return number of bytes written.
Commands should return -1 on error.
will be called to retrieve the error code. On success, commands return 0, unless specified otherwise in the description above.
The library will always issue
before issuing
or
When it no longer wishes to read from this source, it will issue
If the library wishes to read the data again, it will issue
a second time. If the function is unable to provide the data again, it should return -1.
or
will be called before
or
When writing is complete, either
or
will be called.
and
can be issued at any time.
will only be issued in response to the function returning -1.
will be the last command issued; if
was called and succeeded,
will be called before
and similarly for
or
and
or
Upon successful completion, the created source is returned. Otherwise,
is returned and the error code in
or
is set to indicate the error (unless it is
fails if:
Required memory could not be allocated.
and
were added in libzip 1.0.
and
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
10 - Linux cli command HTTP_Configpm
NAME 🖥️ HTTP_Configpm 🖥️
Configuration for request and response objects
VERSION
version 6.46
SYNOPSIS
use HTTP::Config; my $c = HTTP::Config->new; $c->add(m_domain => “.example.com”, m_scheme => “http”, verbose => 1); use HTTP::Request; my $request = HTTP::Request->new(GET => “http://www.example.com”); if (my @m = $c->matching($request)) { print “Yadayada " if $m[0]->{verbose}; }
DESCRIPTION
An HTTP::Config
object is a list of entries that can be matched against request or request/response pairs. Its purpose is to hold configuration data that can be looked up given a request or response object.
Each configuration entry is a hash. Some keys specify matching to occur against attributes of request/response objects. Other keys can be used to hold user data.
The following methods are provided:
$conf = HTTP::Config->new
Constructs a new empty HTTP::Config
object and returns it.
$conf->entries
Returns the list of entries in the configuration object. In scalar context returns the number of entries.
$conf->empty
Return true if there are no entries in the configuration object. This is just a shorthand for not $conf->entries
.
$conf->add( %matchspec, %other )
$conf->add( \entry )
Adds a new entry to the configuration. You can either pass separate key/value pairs or a hash reference.
$conf->remove( %spec )
Removes (and returns) the entries that have matches for all the key/value pairs in %spec
. If %spec
is empty this will match all entries; so it will empty the configuration object.
$conf->matching( $uri, $request, $response )
$conf->matching( $uri )
$conf->matching( $request )
$conf->matching( $response )
Returns the entries that match the given $uri
, $request
and $response
triplet. If called with a single $request
object then the $uri
is obtained by calling its ‘uri_canonical’ method. If called with a single $response
object, then the request object is obtained by calling its ‘request’ method; and then the $uri
is obtained as if a single $request
was provided. The entries are returned with the most specific matches first. In scalar context returns the most specific match or undef
in none match.
$conf->add_item( $item, %matchspec )
$conf->remove_items( %spec )
$conf->matching_items( $uri, $request, $response )
Wrappers that hides the entries themselves.
Matching
The following keys on a configuration entry specify matching. For all of these you can provide an array of values instead of a single value. The entry matches if at least one of the values in the array matches.
Entries that require match against a response object attribute will never match unless a response object was provided.
m_scheme => $scheme
Matches if the URI uses the specified scheme; e.g. “http”.
m_secure => $bool
If $bool
is TRUE; matches if the URI uses a secure scheme. If $bool
is FALSE; matches if the URI does not use a secure scheme. An example of a secure scheme is “https”.
m_host_port => “$hostname:$port”
Matches if the URI’s host_port method return the specified value.
m_host => $hostname
Matches if the URI’s host method returns the specified value.
m_port => $port
Matches if the URI’s port method returns the specified value.
m_domain => “.$domain”
Matches if the URI’s host method return a value that within the given domain. The hostname “www.example.com” will for instance match the domain “.com”.
m_path => $path
Matches if the URI’s path method returns the specified value.
m_path_prefix => $path
Matches if the URI’s path is the specified path or has the specified path as prefix.
m_path_match => $Regexp
Matches if the regular expression matches the URI’s path. Eg. qr/\html$/.
m_method => $method
Matches if the request method matches the specified value. Eg. “GET” or “POST”.
m_code => $digit
m_code => $status_code
Matches if the response status code matches. If a single digit is specified; matches for all response status codes beginning with that digit.
m_proxy => $url
Matches if the request is to be sent to the given Proxy server.
m_media_type => “*/*”
m_media_type => “text/*”
m_media_type => “html”
m_media_type => “xhtml”
m_media_type => “text/html”
Matches if the response media type matches. With a value of “html” matches if $response
->content_is_html returns TRUE. With a value of “xhtml” matches if $response
->content_is_xhtml returns TRUE.
m_uri_ _$method => undef
Matches if the URI object provides the method.
m_uri_ _$method => $string
Matches if the URI’s $method
method returns the given value.
m_header_ _$field => $string
Matches if either the request or the response have a header $field
with the given value.
m_response_attr_ _$key => undef
m_response_attr_ _$key => $string
Matches if the response object has that key, or the entry has the given value.
SEE ALSO
URI, HTTP::Request, HTTP::Response
AUTHOR
Gisle Aas <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 1994 by Gisle Aas.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
11 - Linux cli command isprint_l
NAME 🖥️ isprint_l 🖥️
character classification functions
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
isascii():
_XOPEN_SOURCE
|| /* glibc >= 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE
isblank():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():
Since glibc 2.10:
_XOPEN_SOURCE >= 700
Before glibc 2.10:
_GNU_SOURCE
isascii_l():
Since glibc 2.10:
_XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
Before glibc 2.10:
_GNU_SOURCE
DESCRIPTION
These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.
The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.
The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.
isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).
isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.
isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.
isblank()
checks for a blank character; that is, a space or a tab.
iscntrl()
checks for a control character.
isdigit()
checks for a digit (0 through 9).
isgraph()
checks for any printable character except space.
islower()
checks for a lowercase character.
isprint()
checks for any printable character including space.
ispunct()
checks for any printable character which is not a space or an alphanumeric character.
isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’
‘), carriage return (’
‘), horizontal tab (’ ‘), and vertical tab (’‘).
isupper()
checks for an uppercase letter.
isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.
RETURN VALUE
The values returned are nonzero if the character c falls into the tested class, and zero if not.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit() | Thread safety | MT-Safe |
STANDARDS
isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.
isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.
isascii_l()
GNU.
HISTORY
isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.
isblank()
C99, POSIX.1-2001.
isascii()
POSIX.1-2001 (XSI).
POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.
isascii_l()
glibc 2.3.
CAVEATS
The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:
char c;
...
res = toupper((unsigned char) c);
This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.
The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.
SEE ALSO
iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
12 - Linux cli command Net_DNS_RR_CNAMEpm
NAME 🖥️ Net_DNS_RR_CNAMEpm 🖥️
DNS CNAME resource record
SYNOPSIS
use Net::DNS; $rr = Net::DNS::RR->new(name CNAME cname); $rr = Net::DNS::RR->new( name => alias.example.com, type => CNAME, cname => example.com, );
DESCRIPTION
Class for DNS Canonical Name (CNAME) resource records.
METHODS
The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.
Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.
cname
$cname = $rr->cname; $rr->cname( $cname );
A domain name which specifies the canonical or primary name for the owner. The owner name is an alias.
COPYRIGHT
Copyright (c)1997 Michael Fuhr.
Portions Copyright (c)2002-2003 Chris Reinhardt.
All rights reserved.
Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.
LICENSE
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SEE ALSO
perl Net::DNS Net::DNS::RR RFC1035(3.3.1) <https://iana.org/go/rfc1035#section-3.3.1>
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
13 - Linux cli command XML_DOM_Parserpm
NAME 🖥️ XML_DOM_Parserpm 🖥️
An XML::Parser that builds XML::DOM document structures
SYNOPSIS
use XML::DOM; my $parser = new XML::DOM::Parser; my $doc = $parser->parsefile (“file.xml”); $doc->dispose; # Avoid memory leaks - cleanup circular references
DESCRIPTION
XML::DOM::Parser extends XML::Parser
The XML::Parser module was written by Clark Cooper and is built on top of XML::Parser::Expat, which is a lower level interface to James Clark’s expat library.
XML::DOM::Parser parses XML strings or files and builds a data structure that conforms to the API of the Document Object Model as described at <http://www.w3.org/TR/REC-DOM-Level-1>. See the XML::Parser manpage for other additional properties of the XML::DOM::Parser class. Note that the ‘Style’ property should not be used (it is set internally.)
The XML::Parser NoExpand option is more or less supported, in that it will generate EntityReference objects whenever an entity reference is encountered in character data. I’m not sure how useful this is. Any comments are welcome.
As described in the synopsis, when you create an XML::DOM::Parser object, the parse and parsefile methods create an XML::DOM::Document object from the specified input. This Document object can then be examined, modified and written back out to a file or converted to a string.
When using XML::DOM with XML::Parser version 2.19 and up, setting the XML::DOM::Parser option KeepCDATA to 1 will store CDATASections in CDATASection nodes, instead of converting them to Text nodes. Subsequent CDATASection nodes will be merged into one. Let me know if this is a problem.
Using LWP to parse URLs
The parsefile() method now also supports URLs, e.g. http://www.erols.com/enno/xsa.xml. It uses LWP to download the file and then calls parse() on the resulting string. By default it will use a LWP::UserAgent that is created as follows:
use LWP::UserAgent; $LWP_USER_AGENT = LWP::UserAgent->new; $LWP_USER_AGENT->env_proxy;
Note that env_proxy reads proxy settings from environment variables, which is what I need to do to get thru our firewall. If you want to use a different LWP::UserAgent, you can either set it globally with:
XML::DOM::Parser::set_LWP_UserAgent ($my_agent);
or, you can specify it for a specific XML::DOM::Parser by passing it to the constructor:
my $parser = new XML::DOM::Parser (LWP_UserAgent => $my_agent);
Currently, LWP is used when the filename (passed to parsefile) starts with one of the following URL schemes: http, https, ftp, wais, gopher, or file (followed by a colon.) If I missed one, please let me know.
The LWP modules are part of libwww-perl which is available at CPAN.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
14 - Linux cli command Sub_Quotepm
NAME 🖥️ Sub_Quotepm 🖥️
Efficient generation of subroutines via string eval
SYNOPSIS
package Silly; use Sub::Quote qw(quote_sub unquote_sub quoted_from_sub); quote_sub Silly::kitty, q{ print “meow” }; quote_sub Silly::doggy, q{ print “woof” }; my $sound = 0; quote_sub Silly::dagron, q{ print ++$sound % 2 ? burninate : roar }, { $sound => \sound };
And elsewhere:
Silly->kitty; # meow Silly->doggy; # woof Silly->dagron; # burninate Silly->dagron; # roar Silly->dagron; # burninate
DESCRIPTION
This package provides performant ways to generate subroutines from strings.
SUBROUTINES
quote_sub
my $coderef = quote_sub Foo::bar, q{ print $x++ . " " }, { $x => � };
Arguments: ?$name, $code
, ?\captures, ?\options
$name
is the subroutine where the coderef will be installed.
$code
is a string that will be turned into code.
\%captures
is a hashref of variables that will be made available to the code. The keys should be the full name of the variable to be made available, including the sigil. The values should be references to the values. The variables will contain copies of the values. See the SYNOPSIS’s Silly::dagron
for an example using captures.
Exported by default.
options
“no_install”
Boolean. Set this option to not install the generated coderef into the passed subroutine name on undefer.
“no_defer”
Boolean. Prevents a Sub::Defer wrapper from being generated for the quoted sub. If the sub will most likely be called at some point, setting this is a good idea. For a sub that will most likely be inlined, it is not recommended.
“package”
The package that the quoted sub will be evaluated in. If not specified, the package from sub calling quote_sub
will be used.
“hints”
The value of $^H
to use for the code being evaluated. This captures the settings of the strict pragma. If not specified, the value from the calling code will be used.
“warning_bits”
The value of ${^WARNING_BITS}
to use for the code being evaluated. This captures the warnings set. If not specified, the warnings from the calling code will be used.
“%^H”
The value of %^H
to use for the code being evaluated. This captures additional pragma settings. If not specified, the value from the calling code will be used if possible (on perl 5.10+).
“attributes”
The Subroutine Attributes in perlsub to apply to the sub generated. Should be specified as an array reference. The attributes will be applied to both the generated sub and the deferred wrapper, if one is used.
“file”
The apparent filename to use for the code being evaluated.
“line”
The apparent line number to use for the code being evaluated.
unquote_sub
my $coderef = unquote_sub $sub;
Forcibly replace subroutine with actual code.
If $sub
is not a quoted sub, this is a no-op.
Exported by default.
quoted_from_sub
my $data = quoted_from_sub $sub; my ($name, $code, $captures, $compiled_sub) = @$data;
Returns original arguments to quote_sub, plus the compiled version if this sub has already been unquoted.
Note that $sub
can be either the original quoted version or the compiled version for convenience.
Exported by default.
inlinify
my $prelude = capture_unroll $captures, { $x => 1, $y => 2, }, 4; my $inlined_code = inlinify q{ my ($x, $y) = @_; print $x + $y . " “; }, $x, $y, $prelude;
Takes a string of code, a string of arguments, a string of code which acts as a prelude, and a Boolean representing whether or not to localize the arguments.
quotify
my $quoted_value = quotify $value;
Quotes a single (non-reference) scalar value for use in a code string. The result should reproduce the original value, including strings, undef, integers, and floating point numbers. The resulting floating point numbers (including infinites and not a number) should be precisely equal to the original, if possible. The exact format of the resulting number should not be relied on, as it may include hex floats or math expressions.
capture_unroll
my $prelude = capture_unroll $captures, { $x => 1, $y => 2, }, 4;
Arguments: $from
, \captures, $indent
Generates a snippet of code which is suitable to be used as a prelude for inlinify. $from
is a string will be used as a hashref in the resulting code. The keys of %captures
are the names of the variables and the values are ignored. $indent
is the number of spaces to indent the result by.
qsub
my $hash = { coderef => qsub q{ print “hello”; }, other => 5, };
Arguments: $code
Works exactly like quote_sub, but includes a prototype to only accept a single parameter. This makes it easier to include in hash structures or lists.
Exported by default.
sanitize_identifier
my $var_name = $variable_for_ . sanitize_identifier(@name); quote_sub qq{ print ${var_name} }, { $var_name => \value };
Arguments: $identifier
Sanitizes a value so that it can be used in an identifier.
ENVIRONMENT
SUB_QUOTE_DEBUG
Causes code to be output to STDERR
before being evaled. Several forms are supported:
- All subs will be output.
“/foo/”
Subs will be output if their code matches the given regular expression.
“simple_identifier”
Any sub with the given name will be output.
“Full::identifier”
A sub matching the full name will be output.
“Package::Name::”
Any sub in the given package (including anonymous subs) will be output.
CAVEATS
Much of this is just string-based code-generation, and as a result, a few caveats apply.
return
Calling return
from a quote_sub’ed sub will not likely do what you intend. Instead of returning from the code you defined in quote_sub
, it will return from the overall function it is composited into.
So when you pass in:
quote_sub q{ return 1 if $condition; $morecode }
It might turn up in the intended context as follows:
sub foo { <important code a> do { return 1 if $condition; $morecode }; <important code b> }
Which will obviously return from foo, when all you meant to do was return from the code context in quote_sub and proceed with running important code b.
pragmas
Sub::Quote
preserves the environment of the code creating the quoted subs. This includes the package, strict, warnings, and any other lexical pragmas. This is done by prefixing the code with a block that sets up a matching environment. When inlining Sub::Quote
subs, care should be taken that user pragmas won’t effect the rest of the code.
SUPPORT
Users’ IRC: #moose on irc.perl.org
Development and contribution IRC: #web-simple on irc.perl.org
Bugtracker: <https://rt.cpan.org/Public/Dist/Display.html?Name=Sub-Quote>
Git repository: <git://github.com/moose/Sub-Quote.git>
Git browser: <https://github.com/moose/Sub-Quote>
AUTHOR
mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>
CONTRIBUTORS
frew - Arthur Axel fREW Schmidt (cpan:FREW) <[email protected]>
ribasushi - Peter Rabbitson (cpan:RIBASUSHI) <[email protected]>
Mithaldu - Christian Walde (cpan:MITHALDU) <[email protected]>
tobyink - Toby Inkster (cpan:TOBYINK) <[email protected]>
haarg - Graham Knop (cpan:HAARG) <[email protected]>
bluefeet - Aran Deltac (cpan:BLUEFEET) <[email protected]>
ether - Karen Etheridge (cpan:ETHER) <[email protected]>
dolmen - Olivier Mengué (cpan:DOLMEN) <[email protected]>
alexbio - Alessandro Ghedini (cpan:ALEXBIO) <[email protected]>
getty - Torsten Raudssus (cpan:GETTY) <[email protected]>
arcanez - Justin Hunter (cpan:ARCANEZ) <[email protected]>
kanashiro - Lucas Kanashiro (cpan:KANASHIRO) <[email protected]>
djerius - Diab Jerius (cpan:DJERIUS) <[email protected]>
COPYRIGHT
Copyright (c) 2010-2016 the Sub::Quote AUTHOR and CONTRIBUTORS as listed above.
LICENSE
This library is free software and may be distributed under the same terms as perl itself. See <http://dev.perl.org/licenses/>.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
15 - Linux cli command wcswidth
NAME 🖥️ wcswidth 🖥️
determine columns needed for a fixed-size wide-character string
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <wchar.h>
int wcswidth(const wchar_t *s, size_t n);
DESCRIPTION
The wcswidth() function returns the number of columns needed to represent the wide-character string pointed to by s, but at most n wide characters. If a nonprintable wide character occurs among these characters, -1 is returned.
RETURN VALUE
The wcswidth() function returns the number of column positions for the wide-character string s, truncated to at most length n.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
wcswidth() | Thread safety | MT-Safe locale |
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001.
NOTES
The behavior of wcswidth() depends on the LC_CTYPE category of the current locale.
SEE ALSO
iswprint(3), wcwidth(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
16 - Linux cli command XtMakeResizeRequest
NAME 🖥️ XtMakeResizeRequest 🖥️
make geometry manager request
SYNTAX
#include <X11/Intrinsic.h>
XtGeometryResult XtMakeGeometryRequest(Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply_return);
XtGeometryResult XtMakeResizeRequest(Widget w, Dimension width, Dimension height, Dimension *width_return, Dimension *height_return);
ARGUMENTS
reply_return
Returns the allowed widget size or may be NULL if the requesting widget is not interested in handling XtGeometryAlmost.
request
Specifies the desired widget geometry (size, position, border width, and stacking order).
- Specifies the widget that is making the request.
width_return
height_return
Return the allowed widget width and height.
DESCRIPTION
Depending on the condition, XtMakeGeometryRequest performs the following:
If the widget is unmanaged or the widget’s parent is not realized, it makes the changes and returns XtGeometryYes.
If the parent is not a subclass of compositeWidgetClass or the parent’s geometry_manager is NULL, it issues an error.
If the widget’s being_destroyed field is True, it returns XtGeometryNo.
If the widget x, y, width, height and border_width fields are all equal to the requested values, it returns XtGeometryYes; otherwise, it calls the parent’s geometry_manager procedure with the given parameters.
If the parent’s geometry manager returns XtGeometryYes and if XtCWQueryOnly is not set in the request_mode and if the widget is realized, XtMakeGeometryRequest calls the XConfigureWindow Xlib function to reconfigure the widget’s window (set its size, location, and stacking order as appropriate).
If the geometry manager returns XtGeometryDone, the change has been approved and actually has been done. In this case, XtMakeGeometryRequest does no configuring and returns XtGeometryYes. XtMakeGeometryRequest never returns XtGeometryDone.
Otherwise, XtMakeGeometryRequest returns the resulting value from the parent’s geometry manager.
Children of primitive widgets are always unmanaged; thus, XtMakeGeometryRequest always returns XtGeometryYes when called by a child of a primitive widget.
The XtMakeResizeRequest function, a simple interface to XtMakeGeometryRequest, creates a XtWidgetGeometry structure and specifies that width and height should change. The geometry manager is free to modify any of the other window attributes (position or stacking order) to satisfy the resize request. If the return value is XtGeometryAlmost, width_return and height_return contain a compromise width and height. If these are acceptable, the widget should immediately make an XtMakeResizeRequest and request that the compromise width and height be applied. If the widget is not interested in XtGeometryAlmost replies, it can pass NULL for width_return and height_return.
SEE ALSO
XtConfigureWidget(3), XtQueryGeometery(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
17 - Linux cli command Image_ExifTool_OOXMLpm
NAME 🖥️ Image_ExifTool_OOXMLpm 🖥️
Read Office Open XML+ZIP files
SYNOPSIS
This module is used by Image::ExifTool
DESCRIPTION
This module contains definitions required by Image::ExifTool to extract meta information from Office Open XML files. This is the format of Word, Excel and PowerPoint files written by Microsoft Office 2007 – essentially ZIP archives of XML files.
AUTHOR
Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
“OOXML Tags” in Image::ExifTool::TagNames, “FlashPix Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
18 - Linux cli command procps_misc
NAME 🖥️ procps_misc 🖥️
API for miscellaneous information in the /proc filesystem
SYNOPSIS
#include <libproc2/misc.h>
Platform Particulars
long procps_cpu_count"(void);
long procps_hertz_get"(void);
unsigned int procps_pid_length"(void);
int procps_linux_version"(void);
Runtime Particulars
int procps_loadavg (double *av1, double *av5, double *av15);
int procps_uptime (double *uptime_secs, double *idle_secs);
char *procps_uptime_sprint (void);
char *procps_uptime_sprint_short (void);
Namespace Particulars
int procps_ns_get_id (const char *name);
const char *procps_ns_get_name (int id);
int procps_ns_read_pid (int pid, struct procps_ns *nsp);
Link with -lproc2.
DESCRIPTION
procps_cpu_count() returns the number of CPUs that are currently online as sysconf(_SC_NPROCESSORS_ONLY**)** or an assumed 1.
procps_hertz_get() returns the number of clock ticks per second as sysconf(_SC_CLK_TCK**)** or an assumed 100. Dividing tics by this value yields seconds.
procps_pid_length() returns the maximum string length for a PID on the system. For example, if the largest possible PID value on was 123, then the length would be 3. If the file /proc/sys/kernel/pid_max is unreadable, the value is assumed to be 5.
procps_linux_version() returns the current Linux version as an encoded integer. On non-Linux systems that have an emulated proc filesystem this function returns the version of the Linux emulation instead. The version consists of three positive integers representing the major, minor and patch levels. The following macros are provided for encoding a given Linux version or separating out the components of the current version.
LINUX_VERSION( major , minor , patch )
LINUX_VERSION_MAJOR( ver )
LINUX_VERSION_MINOR( ver )
LINUX_VERSION_PATCH( ver )
procps_loadavg() fetches the system load average and puts the 1, 5 and 15 minute averages into location(s) specified by any pointer which is not NULL.
procps_uptime() returns uptime and/or idle seconds into location(s) specified by any pointer which is not NULL. The sprint varieties return a human-readable string in one of two forms.
HH:MM:SS up HH:MM, # users, load average: 1, 5, 15 MM averages
up HH, MM
procps_ns_get_id() returns the integer id (enum namespace_type) of the namespace for the given namespace name.
procps_ns_get_name() returns the name of the namespace for the given id (enum namespace_type).
procps_ns_read_pid() returns the inodes for the namespaces of the given process in the procps_ns structure pointed to by nsp. Those inodes will appear in the order proscribed by enum namespace_type.
enum namespace_type { PROCPS_NS_CGROUP, PROCPS_NS_IPC, PROCPS_NS_MNT, PROCPS_NS_NET, PROCPS_NS_PID, PROCPS_NS_TIME, PROCPS_NS_USER, PROCPS_NS_UTS };
RETURN VALUE
Functions Returning an `int’ or `long'
An error will be indicated by a negative number that is always the inverse of some well known errno.h value.
Functions Returning an `address'
An error will be indicated by a NULL return pointer with the reason found in the formal errno value.
FILES
/proc/loadavg
The raw values for load average.
/proc/sys/kernel/osrelease
Contains the release version of the Linux kernel or proc filesystem.
/proc/sys/kernel/pid_max
Contains the value at which PIDs wrap around, one greater than the maximum PID value.
/proc/uptime
The raw values for uptime and idle time.
/proc/<PID>/ns
contains the set of namespaces for a particular PID.
SEE ALSO
procps(3), procps_pids(3), proc(5).
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
19 - Linux cli command getttyent
NAME 🖥️ getttyent 🖥️
get ttys file entry
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <ttyent.h>
struct ttyent *getttyent(void);
struct ttyent *getttynam(const char *name);
int setttyent(void);
int endttyent(void);
DESCRIPTION
These functions provide an interface to the file _PATH_TTYS (e.g., /etc/ttys).
The function setttyent() opens the file or rewinds it if already open.
The function endttyent() closes the file.
The function getttynam() searches for a given terminal name in the file. It returns a pointer to a ttyent structure (description below).
The function getttyent() opens the file _PATH_TTYS (if necessary) and returns the first entry. If the file is already open, the next entry. The ttyent structure has the form:
struct ttyent {
char *ty_name; /* terminal device name */
char *ty_getty; /* command to execute, usually getty */
char *ty_type; /* terminal type for termcap */
int ty_status; /* status flags */
char *ty_window; /* command to start up window manager */
char *ty_comment; /* comment field */
};
ty_status can be:
#define TTY_ON 0x01 /* enable logins (start ty_getty program) */
#define TTY_SECURE 0x02 /* allow UID 0 to login */
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
getttyent(), setttyent(), endttyent(), getttynam() | Thread safety | MT-Unsafe race:ttyent |
STANDARDS
BSD.
NOTES
Under Linux, the file /etc/ttys, and the functions described above, are not used.
SEE ALSO
ttyname(3), ttyslot(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
20 - Linux cli command scalbln
NAME 🖥️ scalbln 🖥️
multiply floating-point number by integral power of radix
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double scalbln(double x, long exp);
float scalblnf(float x, long exp);
long double scalblnl(long double x, long exp);
double scalbn(double x, int exp);
float scalbnf(float x, int exp);
long double scalbnl(long double x, int exp);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
scalbln(), scalblnf(), scalblnl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
scalbn(), scalbnf(), scalbnl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:
x * FLT_RADIX ** exp
The definition of FLT_RADIX can be obtained by including <float.h>.
RETURN VALUE
On success, these functions return x * FLT_RADIX ** exp.
If x is a NaN, a NaN is returned.
If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.
If x is +0 (-0), +0 (-0) is returned.
If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.
If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.
ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions.
The following errors can occur:
Range error, overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.
Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
glibc 2.1. C99, POSIX.1-2001.
HISTORY
These functions differ from the obsolete functions described in scalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those in scalb(3) have a second argument of type double.
NOTES
If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to ldexp(3).
BUGS
Before glibc 2.20, these functions did not set errno for range errors.
SEE ALSO
ldexp(3), scalb(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
21 - Linux cli command XdbeBeginIdiom
NAME 🖥️ XdbeBeginIdiom 🖥️
marks the beginning of a DBE idiom sequence.
SYNOPSIS
#include <X11/extensions/Xdbe.h>
Status XdbeBeginIdiom( Display *dpy)
DESCRIPTION
This function marks the beginning of an idiom sequence.
SEE ALSO
DBE, XdbeAllocateBackBufferName(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetBackBufferAttributes(), XdbeGetVisualInfo(), XdbeQueryExtension(), XdbeSwapBuffers().
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
22 - Linux cli command logbf
NAME 🖥️ logbf 🖥️
get exponent of a floating-point value
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double logb(double x);
float logbf(float x);
long double logbl(long double x);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
logb():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| _XOPEN_SOURCE >= 500
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
logbf(), logbl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These functions extract the exponent from the internal floating-point representation of x and return it as a floating-point value. The integer constant FLT_RADIX, defined in <float.h>, indicates the radix used for the system’s floating-point representation. If FLT_RADIX is 2, logb(x) is similar to floor(log2(fabs(x))), except that the latter may give an incorrect integer due to intermediate rounding.
If x is subnormal, logb() returns the exponent x would have if it were normalized.
RETURN VALUE
On success, these functions return the exponent of x.
If x is a NaN, a NaN is returned.
If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.
If x is negative infinity or positive infinity, then positive infinity is returned.
ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions.
The following errors can occur:
Pole error: x is 0
A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.
These functions do not set errno.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
logb(), logbf(), logbl() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
C99, POSIX.1-2001.
logb()
4.3BSD (see IEEE.3 in the 4.3BSD manual).
SEE ALSO
ilogb(3), log(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
23 - Linux cli command Net_DBus_Test_MockIteratorpm
NAME 🖥️ Net_DBus_Test_MockIteratorpm 🖥️
Iterator over a mock message
SYNOPSIS
Creating a new message
my $msg = new Net::DBus::Test::MockMessage my $iterator = $msg->iterator; $iterator->append_boolean(1); $iterator->append_byte(123);
Reading from a message
my $msg = …get it from somewhere… my $iter = $msg->iterator(); my $i = 0; while ($iter->has_next()) { $iter->next(); $i++; if ($i == 1) { my $val = $iter->get_boolean(); } elsif ($i == 2) { my $val = $iter->get_byte(); } }
DESCRIPTION
This module provides a “mock” counterpart to the Net::DBus::Binding::Iterator object which is capable of iterating over mock message objects. Instances of this module are not created directly, instead they are obtained via the iterator
method on the Net::DBus::Test::MockMessage module.
METHODS
$res = $iter->has_next()
Determines if there are any more fields in the message itertor to be read. Returns a positive value if there are more fields, zero otherwise.
$success = $iter->next()
Skips the iterator onto the next field in the message. Returns a positive value if the current field pointer was successfully advanced, zero otherwise.
my $val = $iter->get_boolean()
$iter->append_boolean($val);
Read or write a boolean value from/to the message iterator
my $val = $iter->get_byte()
$iter->append_byte($val);
Read or write a single byte value from/to the message iterator.
my $val = $iter->get_string()
$iter->append_string($val);
Read or write a UTF-8 string value from/to the message iterator
my $val = $iter->get_object_path()
$iter->append_object_path($val);
Read or write a UTF-8 string value, whose contents is a valid object path, from/to the message iterator
my $val = $iter->get_signature()
$iter->append_signature($val);
Read or write a UTF-8 string, whose contents is a valid type signature, value from/to the message iterator
my $val = $iter->get_int16()
$iter->append_int16($val);
Read or write a signed 16 bit value from/to the message iterator
my $val = $iter->get_uint16()
$iter->append_uint16($val);
Read or write an unsigned 16 bit value from/to the message iterator
my $val = $iter->get_int32()
$iter->append_int32($val);
Read or write a signed 32 bit value from/to the message iterator
my $val = $iter->get_uint32()
$iter->append_uint32($val);
Read or write an unsigned 32 bit value from/to the message iterator
my $val = $iter->get_int64()
$iter->append_int64($val);
Read or write a signed 64 bit value from/to the message iterator. An error will be raised if this build of Perl does not support 64 bit integers
my $val = $iter->get_uint64()
$iter->append_uint64($val);
Read or write an unsigned 64 bit value from/to the message iterator. An error will be raised if this build of Perl does not support 64 bit integers
my $val = $iter->get_double()
$iter->append_double($val);
Read or write a double precision floating point value from/to the message iterator
my $val = $iter->get_unix_fd()
$iter->append_unix_fd($val);
Read or write a unix_fd value from/to the message iterator
my $value = $iter->get()
my $value = $iter->get($type);
Get the current value pointed to by this iterator. If the optional $type
parameter is supplied, the wire type will be compared with the desired type & a warning output if their differ. The $type
value must be one of the Net::DBus::Binding::Message::TYPE*
constants.
my $hashref = $iter->get_dict()
If the iterator currently points to a dictionary value, unmarshalls and returns the value as a hash reference.
my $hashref = $iter->get_array()
If the iterator currently points to an array value, unmarshalls and returns the value as a array reference.
my $hashref = $iter->get_variant()
If the iterator currently points to a variant value, unmarshalls and returns the value contained in the variant.
my $hashref = $iter->get_struct()
If the iterator currently points to an struct value, unmarshalls and returns the value as a array reference. The values in the array correspond to members of the struct.
$iter->append($value)
$iter->append($value, $type)
Appends a value to the message associated with this iterator. The value is marshalled into wire format, according to the following rules. If the $value
is an instance of Net::DBus::Binding::Value, the embedded data type is used. If the $type
parameter is supplied, that is taken to represent the data type. The type must be one of the Net::DBus::Binding::Message::TYPE_*
constants. Otherwise, the data type is chosen to be a string, dict or array according to the perl data types SCALAR, HASH or ARRAY.
my $type = $iter->guess_type($value)
Make a best guess at the on the wire data type to use for marshalling $value
. If the value is a hash reference, the dictionary type is returned; if the value is an array reference the array type is returned; otherwise the string type is returned.
my $sig = $iter->format_signature($type)
Given a data type representation, construct a corresponding signature string
$iter->append_array($value, $type)
Append an array of values to the message. The $value
parameter must be an array reference, whose elements all have the same data type specified by the $type
parameter.
$iter->append_struct($value, $type)
Append a struct to the message. The $value
parameter must be an array reference, whose elements correspond to members of the structure. The $type
parameter encodes the type of each member of the struct.
$iter->append_dict($value, $type)
Append a dictionary to the message. The $value
parameter must be an hash reference.The $type
parameter encodes the type of the key and value of the hash.
$iter->append_variant($value)
Append a value to the message, encoded as a variant type. The $value
can be of any type, however, the variant will be encoded as either a string, dictionary or array according to the rules of the guess_type
method.
my $type = $iter->get_arg_type
Retrieves the type code of the value pointing to by this iterator. The returned code will correspond to one of the constants Net::DBus::Binding::Message::TYPE_*
my $type = $iter->get_element_type
If the iterator points to an array, retrieves the type code of array elements. The returned code will correspond to one of the constants Net::DBus::Binding::Message::TYPE_*
BUGS
It doesn’t completely replicate the API of Net::DBus::Binding::Iterator, merely enough to make the high level bindings work in a test scenario.
AUTHOR
Daniel P. Berrange
COPYRIGHT
Copyright (C) 2005-2009 Daniel P. Berrange
SEE ALSO
Net::DBus::Test::MockMessage, Net::DBus::Binding::Iterator, <http://www.mockobjects.com/Faq.html>
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
24 - Linux cli command sinh
NAME 🖥️ sinh 🖥️
hyperbolic sine function
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
sinhf(), sinhl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These functions return the hyperbolic sine of x, which is defined mathematically as:
sinh(x) = (exp(x) - exp(-x)) / 2
RETURN VALUE
On success, these functions return the hyperbolic sine of x.
If x is a NaN, a NaN is returned.
If x is +0 (-0), +0 (-0) is returned.
If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.
If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the same sign as x.
ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions.
The following errors can occur:
Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
sinh(), sinhf(), sinhl() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
C99, POSIX.1-2001.
The variant returning double also conforms to SVr4, 4.3BSD, C89.
SEE ALSO
acosh(3), asinh(3), atanh(3), cosh(3), csinh(3), tanh(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
25 - Linux cli command wcslen
NAME 🖥️ wcslen 🖥️
determine the length of a wide-character string
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <wchar.h>
size_t wcslen(const wchar_t *s);
DESCRIPTION
The wcslen() function is the wide-character equivalent of the strlen(3) function. It determines the length of the wide-character string pointed to by s, excluding the terminating null wide character (L’�’).
RETURN VALUE
The wcslen() function returns the number of wide characters in s.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
wcslen() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
POSIX.1-2001, C99.
NOTES
In cases where the input buffer may not contain a terminating null wide character, wcsnlen(3) should be used instead.
SEE ALSO
strlen(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
26 - Linux cli command XtPopup
NAME 🖥️ XtPopup 🖥️
map a pop-up
SYNTAX
#include <X11/Intrinsic.h>
void XtPopup(Widget popup_shell, XtGrabKind grab_kind);
void XtPopupSpringLoaded(Widget popup_shell);
void XtCallbackNone(Widget w, XtPointer client_data, XtPointer call_data);
void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer call_data);
void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer call_data);
ACTIONS
void XtMenuPopup(String shell_name);
ARGUMENTS
call_data
Specifies the callback data, which is not used by this procedure.
client_data
Specifies the pop-up shell.
grab_kind
Specifies the way in which user events should be constrained.
popup_shell
Specifies the widget shell.
- Specifies the widget.
DESCRIPTION
The XtPopup function performs the following:
Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.
Generates an error if the shell’s popped_up field is already True.
Calls the callback procedures on the shell’s popup_callback list.
Sets the shell popped_up field to True, the shell spring_loaded field to False, and the shell grab_kind field from grab_kind.
If the shell’s create_popup_child field is non-NULL, XtPopup calls it with popup_shell as the parameter.
If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls:
XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)
Calls XtRealizeWidget with popup_shell specified.
Calls XMapWindow with popup_shell specified.
The XtPopupSpringLoaded function performs exactly as XtPopup except that it sets the shell spring_loaded field to True and always calls XtAddGrab with exclusive True and spring_loaded True.
The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive functions call XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonexclusive, and XtGrabExclusive, respectively. Each function then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.
XtMenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to XtMenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.
If XtMenuPopup is invoked on ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabExclusive and spring_loaded set to True. If XtMenuPopup is invoked on EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:
Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.
Generates an error if the shell’s popped_up field is already True.
Calls the callback procedures on the shell’s popup_callback list.
Sets the shell popped_up field to True and the shell grab_kind and spring_loaded fields appropriately.
If the shell’s create_popup_child field is non-NULL, it is called with popup_shell as the parameter.
Calls:
XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)
Calls XtRealizeWidget with popup_shell specified.
Calls XMapWindow with popup_shell specified.
(Note that these actions are the same as those for XtPopup.) XtMenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If XtMenuPopup gets to the application widget and cannot find a matching shell, it generates an error.
SEE ALSO
XtCreatePopupShell(3), XtPopdown(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
27 - Linux cli command zip_error_init
libzip (-lzip)
The
function initializes the zip_error pointed to by
must be allocated before calling
The
function does the same, but additionally sets the zip error code to
and sets the system error code to the current
value, if appropriate.
and
were added in libzip 1.0.
and
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
28 - Linux cli command Image_ExifTool_Lang_frpm
NAME 🖥️ Image_ExifTool_Lang_frpm 🖥️
ExifTool French language translations
DESCRIPTION
This file is used by Image::ExifTool to generate localized tag descriptions and values.
AUTHOR
Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ACKNOWLEDGEMENTS
Thanks to Jens Duttke, Bernard Guillotin, Jean Glasser, Jean Piquemal, Harry Nizard, Alphonse Philippe and Philippe Bonnaure (GraphicConverter) for providing this translation.
SEE ALSO
Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
29 - Linux cli command iswlower
NAME 🖥️ iswlower 🖥️
test for lowercase wide character
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <wctype.h>
int iswlower(wint_t wc);
DESCRIPTION
The iswlower() function is the wide-character equivalent of the islower(3) function. It tests whether wc is a wide character belonging to the wide-character class “lower”.
The wide-character class “lower” is a subclass of the wide-character class “alpha”, and therefore also a subclass of the wide-character class “alnum”, of the wide-character class “graph” and of the wide-character class “print”.
Being a subclass of the wide-character class “print”, the wide-character class “lower” is disjoint from the wide-character class “cntrl”.
Being a subclass of the wide-character class “graph”, the wide-character class “lower” is disjoint from the wide-character class “space” and its subclass “blank”.
Being a subclass of the wide-character class “alnum”, the wide-character class “lower” is disjoint from the wide-character class “punct”.
Being a subclass of the wide-character class “alpha”, the wide-character class “lower” is disjoint from the wide-character class “digit”.
The wide-character class “lower” contains at least those characters wc which are equal to towlower(wc) and different from towupper(wc).
The wide-character class “lower” always contains at least the letters ‘a’ to ‘z’.
RETURN VALUE
The iswlower() function returns nonzero if wc is a wide character belonging to the wide-character class “lower”. Otherwise, it returns zero.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
iswlower() | Thread safety | MT-Safe locale |
STANDARDS
C11, POSIX.1-2008.
HISTORY
POSIX.1-2001, C99.
NOTES
The behavior of iswlower() depends on the LC_CTYPE category of the current locale.
This function is not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case.
SEE ALSO
islower(3), iswctype(3), towlower(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
30 - Linux cli command truncf
NAME 🖥️ truncf 🖥️
round to integer, toward zero
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double trunc(double x);
float truncf(float x);
long double truncl(long double x);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
trunc(), truncf(), truncl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
DESCRIPTION
These functions round x to the nearest integer value that is not larger in magnitude than x.
RETURN VALUE
These functions return the rounded integer value, in floating format.
If x is integral, infinite, or NaN, x itself is returned.
ERRORS
No errors occur.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
trunc(), truncf(), truncl() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
glibc 2.1. C99, POSIX.1-2001.
NOTES
The integral value returned by these functions may be too large to store in an integer type (int, long, etc.). To avoid an overflow, which will produce undefined results, an application should perform a range check on the returned value before assigning it to an integer type.
SEE ALSO
ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
31 - Linux cli command gai_cancel
NAME 🖥️ gai_cancel 🖥️
asynchronous network address and service translation
LIBRARY
Asynchronous name lookup library (libanl, -lanl)
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <netdb.h>
int getaddrinfo_a(int mode, struct gaicb *list[restrict],
int nitems, struct sigevent *restrict sevp);
int gai_suspend(const struct gaicb *const list[], int nitems,
const struct timespec *timeout);
int gai_error(struct gaicb *req);
int gai_cancel(struct gaicb *req);
DESCRIPTION
The getaddrinfo_a() function performs the same task as getaddrinfo(3), but allows multiple name look-ups to be performed asynchronously, with optional notification on completion of look-up operations.
The mode argument has one of the following values:
GAI_WAIT
Perform the look-ups synchronously. The call blocks until the look-ups have completed.
GAI_NOWAIT
Perform the look-ups asynchronously. The call returns immediately, and the requests are resolved in the background. See the discussion of the sevp argument below.
The array list specifies the look-up requests to process. The nitems argument specifies the number of elements in list. The requested look-up operations are started in parallel. NULL elements in list are ignored. Each request is described by a gaicb structure, defined as follows:
struct gaicb {
const char *ar_name;
const char *ar_service;
const struct addrinfo *ar_request;
struct addrinfo *ar_result;
};
The elements of this structure correspond to the arguments of getaddrinfo(3). Thus, ar_name corresponds to the node argument and ar_service to the service argument, identifying an Internet host and a service. The ar_request element corresponds to the hints argument, specifying the criteria for selecting the returned socket address structures. Finally, ar_result corresponds to the res argument; you do not need to initialize this element, it will be automatically set when the request is resolved. The addrinfo structure referenced by the last two elements is described in getaddrinfo(3).
When mode is specified as GAI_NOWAIT, notifications about resolved requests can be obtained by employing the sigevent structure pointed to by the sevp argument. For the definition and general details of this structure, see sigevent(3type). The sevp->sigev_notify field can have the following values:
SIGEV_NONE
Don’t provide any notification.
SIGEV_SIGNAL
When a look-up completes, generate the signal sigev_signo for the process. See sigevent(3type) for general details. The si_code field of the siginfo_t structure will be set to SI_ASYNCNL.
SIGEV_THREAD
When a look-up completes, invoke sigev_notify_function as if it were the start function of a new thread. See sigevent(3type) for details.
For SIGEV_SIGNAL and SIGEV_THREAD, it may be useful to point sevp->sigev_value.sival_ptr to list.
The gai_suspend() function suspends execution of the calling thread, waiting for the completion of one or more requests in the array list. The nitems argument specifies the size of the array list. The call blocks until one of the following occurs:
One or more of the operations in list completes.
The call is interrupted by a signal that is caught.
The time interval specified in timeout elapses. This argument specifies a timeout in seconds plus nanoseconds (see nanosleep(2) for details of the timespec structure). If timeout is NULL, then the call blocks indefinitely (until one of the events above occurs).
No explicit indication of which request was completed is given; you must determine which request(s) have completed by iterating with gai_error() over the list of requests.
The gai_error() function returns the status of the request req: either EAI_INPROGRESS if the request was not completed yet, 0 if it was handled successfully, or an error code if the request could not be resolved.
The gai_cancel() function cancels the request req. If the request has been canceled successfully, the error status of the request will be set to EAI_CANCELED and normal asynchronous notification will be performed. The request cannot be canceled if it is currently being processed; in that case, it will be handled as if gai_cancel() has never been called. If req is NULL, an attempt is made to cancel all outstanding requests that the process has made.
RETURN VALUE
The getaddrinfo_a() function returns 0 if all of the requests have been enqueued successfully, or one of the following nonzero error codes:
EAI_AGAIN
The resources necessary to enqueue the look-up requests were not available. The application may check the error status of each request to determine which ones failed.
EAI_MEMORY
Out of memory.
EAI_SYSTEM
mode is invalid.
The gai_suspend() function returns 0 if at least one of the listed requests has been completed. Otherwise, it returns one of the following nonzero error codes:
EAI_AGAIN
The given timeout expired before any of the requests could be completed.
EAI_ALLDONE
There were no actual requests given to the function.
EAI_INTR
A signal has interrupted the function. Note that this interruption might have been caused by signal notification of some completed look-up request.
The gai_error() function can return EAI_INPROGRESS for an unfinished look-up request, 0 for a successfully completed look-up (as described above), one of the error codes that could be returned by getaddrinfo(3), or the error code EAI_CANCELED if the request has been canceled explicitly before it could be finished.
The gai_cancel() function can return one of these values:
EAI_CANCELED
The request has been canceled successfully.
EAI_NOTCANCELED
The request has not been canceled.
EAI_ALLDONE
The request has already completed.
The gai_strerror(3) function translates these error codes to a human readable string, suitable for error reporting.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
getaddrinfo_a(), gai_suspend(), gai_error(), gai_cancel() | Thread safety | MT-Safe |
STANDARDS
GNU.
HISTORY
glibc 2.2.3.
The interface of getaddrinfo_a() was modeled after the lio_listio(3) interface.
EXAMPLES
Two examples are provided: a simple example that resolves several requests in parallel synchronously, and a complex example showing some of the asynchronous capabilities.
Synchronous example
The program below simply resolves several hostnames in parallel, giving a speed-up compared to resolving the hostnames sequentially using getaddrinfo(3). The program might be used like this:
$ ./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org
mirrors.kernel.org: 139.178.88.99
enoent.linuxfoundation.org: Name or service not known
gnu.org: 209.51.188.116
Here is the program source code
#define _GNU_SOURCE
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOC(n, type) ((type *) reallocarray(NULL, n, sizeof(type)))
int
main(int argc, char *argv[])
{
int ret;
struct gaicb *reqs[argc - 1];
char host[NI_MAXHOST];
struct addrinfo *res;
if (argc < 2) {
fprintf(stderr, "Usage: %s HOST...
“, argv[0]); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { reqs[i] = MALLOC(1, struct gaicb); if (reqs[i] == NULL) err(EXIT_FAILURE, “malloc”); memset(reqs[i], 0, sizeof(*reqs[0])); reqs[i]->ar_name = argv[i + 1]; } ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL); if (ret != 0) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { printf("%s: “, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (ret == 0) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret != 0) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } exit(EXIT_SUCCESS); }
Asynchronous example
This example shows a simple interactive getaddrinfo_a() front-end. The notification facility is not demonstrated.
An example session might look like this:
$ ./a.out
> a mirrors.kernel.org enoent.linuxfoundation.org gnu.org
> c 2
[2] gnu.org: Request not canceled
> w 0 1
[00] mirrors.kernel.org: Finished
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Processing request in progress
[02] gnu.org: 209.51.188.116
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Name or service not known
[02] gnu.org: 209.51.188.116
The program source is as follows:
#define _GNU_SOURCE
#include <assert.h>
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define CALLOC(n, type) ((type *) calloc(n, sizeof(type)))
#define REALLOCF(ptr, n, type) \
({ \
static_assert(__builtin_types_compatible_p(typeof(ptr), type *)); \
\
(type *) reallocarrayf(ptr, n, sizeof(type)); \
})
static struct gaicb **reqs = NULL;
static size_t nreqs = 0;
static inline void *
reallocarrayf(void *p, size_t nmemb, size_t size)
{
void *q;
q = reallocarray(p, nmemb, size);
if (q == NULL && nmemb != 0 && size != 0)
free(p);
return q;
}
static char *
getcmd(void)
{
static char buf[256];
fputs("> ", stdout); fflush(stdout);
if (fgets(buf, sizeof(buf), stdin) == NULL)
return NULL;
if (buf[strlen(buf) - 1] == '
‘) buf[strlen(buf) - 1] = 0; return buf; } /* Add requests for specified hostnames. */ static void add_requests(void) { size_t nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " “))) { nreqs++; reqs = REALLOCF(reqs, nreqs, struct gaicb ); if (reqs == NULL) err(EXIT_FAILURE, “reallocf”); reqs[nreqs - 1] = CALLOC(1, struct gaicb); if (reqs[nreqs - 1] == NULL) err(EXIT_FAILURE, “calloc”); reqs[nreqs - 1]->ar_name = strdup(host); } / Queue nreqs_base..nreqs requests. / ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base], nreqs - nreqs_base, NULL); if (ret) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } } / Wait until at least one of specified requests completes. */ static void wait_requests(void) { char *id; int ret; size_t n; struct gaicb const **wait_reqs; wait_reqs = CALLOC(nreqs, const struct gaicb ); if (wait_reqs == NULL) err(EXIT_FAILURE, “calloc”); / NULL elements are ignored by gai_suspend(). / while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } wait_reqs[n] = reqs[n]; } ret = gai_suspend(wait_reqs, nreqs, NULL); if (ret) { printf(“gai_suspend(): %s “, gai_strerror(ret)); return; } for (size_t i = 0; i < nreqs; i++) { if (wait_reqs[i] == NULL) continue; ret = gai_error(reqs[i]); if (ret == EAI_INPROGRESS) continue; printf(”[%02zu] %s: %s “, i, reqs[i]->ar_name, ret == 0 ? “Finished” : gai_strerror(ret)); } } / Cancel specified requests. */ static void cancel_requests(void) { char id; int ret; size_t n; while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } ret = gai_cancel(reqs[n]); printf(”[%s] %s: %s “, id, reqs[atoi(id)]->ar_name, gai_strerror(ret)); } } / List all requests. */ static void list_requests(void) { int ret; char host[NI_MAXHOST]; struct addrinfo *res; for (size_t i = 0; i < nreqs; i++) { printf(”[%02zu] %s: “, i, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (!ret) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } } int main(void) { char *cmdline; char *cmd; while ((cmdline = getcmd()) != NULL) { cmd = strtok(cmdline, " “); if (cmd == NULL) { list_requests(); } else { switch (cmd[0]) { case ‘a’: add_requests(); break; case ‘w’: wait_requests(); break; case ‘c’: cancel_requests(); break; case ’l’: list_requests(); break; default: fprintf(stderr, “Bad command: %c “, cmd[0]); break; } } } exit(EXIT_SUCCESS); }
SEE ALSO
getaddrinfo(3), inet(3), lio_listio(3), hostname(7), ip(7), sigevent(3type)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
32 - Linux cli command sa_family_ttype
NAME 🖥️ sa_family_ttype 🖥️
socket address
LIBRARY
Standard C library (libc)
SYNOPSIS
#include <sys/socket.h>
struct sockaddr {
sa_family_t sa_family; /* Address family */
char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;
Internet domain sockets
#include <netinet/in.h>
struct sockaddr_in {
sa_family_t sin_family; /* AF_INET */
in_port_t sin_port; /* Port number */
struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
sa_family_t sin6_family; /* AF_INET6 */
in_port_t sin6_port; /* Port number */
uint32_t sin6_flowinfo; /* IPv6 flow info */
struct in6_addr sin6_addr; /* IPv6 address */
uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
in_addr_t s_addr;
};
struct in6_addr {
uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;
UNIX domain sockets
#include <sys/un.h>
struct sockaddr_un {
sa_family_t sun_family; /* Address family */
char sun_path[]; /* Socket pathname */
};
DESCRIPTION
sockaddr
Describes a socket address.
sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.
socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.
sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.
Internet domain sockets
sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.
sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.
UNIX domain sockets
sockaddr_un
Describes a UNIX domain socket address.
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001.
socklen_t was invented by POSIX. See also accept(2).
These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.
NOTES
socklen_t is also defined in <netdb.h>.
sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.
SEE ALSO
accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
33 - Linux cli command TAILQ_SWAP
NAME 🖥️ TAILQ_SWAP 🖥️
implementation of a doubly linked tail queue
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
TAILQ_ENTRY NAME);
DESCRIPTION
These macros define and operate on doubly linked tail queues.
In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().
Creation
A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:
TAILQ_HEAD(HEADNAME, TYPE) head;
where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:
struct HEADNAME *headp;
(The names head and headp are user selectable.)
TAILQ_ENTRY() declares a structure that connects the elements in the queue.
TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.
TAILQ_INIT() initializes the queue referenced by
TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.
Insertion
TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.
TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.
TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.
TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.
Traversal
TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.
TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.
TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.
TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.
TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.
TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.
Removal
TAILQ_REMOVE() removes the element elm from the queue.
Other features
TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.
RETURN VALUE
TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.
TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.
TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.
STANDARDS
BSD.
HISTORY
4.4BSD.
CAVEATS
TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.
EXAMPLES
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
int data;
TAILQ_ENTRY(entry) entries; /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct tailhead head; /* Tail queue head */
int i;
TAILQ_INIT(&head); /* Initialize the queue */
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
TAILQ_INSERT_HEAD(&head, n1, entries);
n1 = malloc(sizeof(struct entry)); /* Insert at the tail */
TAILQ_INSERT_TAIL(&head, n1, entries);
n2 = malloc(sizeof(struct entry)); /* Insert after */
TAILQ_INSERT_AFTER(&head, n1, n2, entries);
n3 = malloc(sizeof(struct entry)); /* Insert before */
TAILQ_INSERT_BEFORE(n2, n3, entries);
TAILQ_REMOVE(&head, n2, entries); /* Deletion */
free(n2);
/* Forward traversal */
i = 0;
TAILQ_FOREACH(np, &head, entries)
np->data = i++;
/* Reverse traversal */
TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
printf("%i
“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }
SEE ALSO
insque(3), queue(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
34 - Linux cli command XdbeGetBackBufferAttributes
NAME 🖥️ XdbeGetBackBufferAttributes 🖥️
returns attributes of a DBE buffer.
SYNOPSIS
#include <X11/extensions/Xdbe.h>
XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( Display *dpy, XdbeBackBuffer buffer)
DESCRIPTION
This function returns the attributes associated with the specified buffer.
The XdbeBackBufferAttributes structure has the following fields:
Window window window that buffer belongs to
If buffer is not a valid XdbeBackBuffer, window returns None.
The returned XdbeBackBufferAttributes structure can be freed with the Xlib function Xfree().
SEE ALSO
DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetVisualInfo(), XdbeQueryExtension(), XdbeSwapBuffers().
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
35 - Linux cli command XML_RegExppm
NAME 🖥️ XML_RegExppm 🖥️
Regular expressions for XML tokens
SYNOPSIS
use XML::RegExp; if ($my_name =~ /^$XML::RegExp::Name$/) { # $my_name is a valid XML Name }
DESCRIPTION
This package contains regular expressions for the following XML tokens: BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar, EntityRef, CharRef, Reference, Name, NmToken, and AttValue.
The definitions of these tokens were taken from the XML spec (Extensible Markup Language 1.0) at <http://www.w3.org/TR/REC-xml>.
Also contains the regular expressions for the following tokens from the XML Namespaces spec at <http://www.w3.org/TR/REC-xml-names>: NCNameChar, NCName, QName, Prefix and LocalPart.
AUTHOR
Original Author is Enno Derksen <[email protected]>
Please send bugs, comments and suggestions to T.J. Mather <[email protected]>
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
36 - Linux cli command le64toh
NAME 🖥️ le64toh 🖥️
convert values between host and big-/little-endian byte order
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():
Since glibc 2.19:
_DEFAULT_SOURCE
In glibc up to and including 2.19:
_BSD_SOURCE
DESCRIPTION
These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.
The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.
The functions with names of the form “htobenn” convert from host byte order to big-endian order.
The functions with names of the form “htolenn” convert from host byte order to little-endian order.
The functions with names of the form “benntoh” convert from big-endian order to host byte order.
The functions with names of the form “lenntoh” convert from little-endian order to host byte order.
VERSIONS
Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).
STANDARDS
None.
HISTORY
glibc 2.9.
These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().
The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.
EXAMPLES
The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:
$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344
Program source
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
union {
uint32_t u32;
uint8_t arr[4];
} x;
x.arr[0] = 0x11; /* Lowest-address byte */
x.arr[1] = 0x22;
x.arr[2] = 0x33;
x.arr[3] = 0x44; /* Highest-address byte */
printf("x.u32 = %#x
“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }
SEE ALSO
bswap(3), byteorder(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
37 - Linux cli command pcap_list_tstamp_typespcap
NAME 🖥️ pcap_list_tstamp_typespcap 🖥️
get a list of time stamp types supported by a capture device, and free that list
SYNOPSIS
#include <pcap/pcap.h>
int pcap_list_tstamp_types(pcap_t *p, int **tstamp_typesp);
void pcap_free_tstamp_types(int *tstamp_types);
DESCRIPTION
pcap_list_tstamp_types() is used to get a list of the supported time stamp types of the interface associated with the pcap descriptor. pcap_list_tstamp_types() allocates an array to hold the list and sets *tstamp_typesp to point to the array. See pcap-tstamp(7) for a list of all the time stamp types.
The caller is responsible for freeing the array with pcap_free_tstamp_types(), which frees the list pointed to by tstamp_types.
RETURN VALUE
pcap_list_tstamp_types() returns the number of time stamp types in the array on success and PCAP_ERROR on failure. A return value of one means that the only time stamp type supported is the one in the list, which is the capture device’s default time stamp type. A return value of zero means that the only time stamp type supported is PCAP_TSTAMP_HOST, which is the capture device’s default time stamp type (only older versions of libpcap will return that; newer versions will always return one or more types). If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.
BACKWARD COMPATIBILITY
These functions became available in libpcap release 1.2.1. In previous releases, the time stamp type cannot be set; only the default time stamp type offered by a capture source is available.
SEE ALSO
pcap(3PCAP), pcap_tstamp_type_val_to_name(3PCAP), pcap-tstamp(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
38 - Linux cli command initstate
NAME 🖥️ initstate 🖥️
random number generator
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
long random(void);
void srandom(unsigned int seed);
char *initstate(unsigned int seed, char state[.n], size_t n);
char *setstate(char *state);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
random(), srandom(), initstate(), setstate():
_XOPEN_SOURCE >= 500
|| /* glibc >= 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
DESCRIPTION
The random() function uses a nonlinear additive feedback random number generator employing a default table of size 31 long integers to return successive pseudo-random numbers in the range from 0 to 2^31 - 1. The period of this random number generator is very large, approximately 16 * ((2^31) - 1).
The srandom() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by random(). These sequences are repeatable by calling srandom() with the same seed value. If no seed value is provided, the random() function is automatically seeded with a value of 1.
The initstate() function allows a state array state to be initialized for use by random(). The size of the state array n is used by initstate() to decide how sophisticated a random number generator it should use—the larger the state array, the better the random numbers will be. Current “optimal” values for the size of the state array n are 8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to the nearest known amount. Using less than 8 bytes results in an error. seed is the seed for the initialization, which specifies a starting point for the random number sequence, and provides for restarting at the same point.
The setstate() function changes the state array used by the random() function. The state array state is used for random number generation until the next call to initstate() or setstate(). state must first have been initialized using initstate() or be the result of a previous call of setstate().
RETURN VALUE
The random() function returns a value between 0 and (2^31) - 1. The srandom() function returns no value.
The initstate() function returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.
On success, setstate() returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.
ERRORS
EINVAL
The state argument given to setstate() was NULL.
EINVAL
A state array of less than 8 bytes was specified to initstate().
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
random(), srandom(), initstate(), setstate() | Thread safety | MT-Safe |
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001, 4.3BSD.
NOTES
Random-number generation is a complex topic. Numerical Recipes in C: The Art of Scientific Computing (William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) provides an excellent discussion of practical random-number generation issues in Chapter 7 (Random Numbers).
For a more theoretical discussion which also covers many practical issues in depth, see Chapter 3 (Random Numbers) in Donald E. Knuth’s The Art of Computer Programming, volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts: Addison-Wesley Publishing Company, 1981.
CAVEATS
The random() function should not be used in multithreaded programs where reproducible behavior is required. Use random_r(3) for that purpose.
BUGS
According to POSIX, initstate() should return NULL on error. In the glibc implementation, errno is (as specified) set on error, but the function does not return NULL.
SEE ALSO
getrandom(2), drand48(3), rand(3), random_r(3), srand(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
39 - Linux cli command timevaltype
NAME 🖥️ timevaltype 🖥️
time in seconds and microseconds
LIBRARY
Standard C library (libc)
SYNOPSIS
#include <sys/time.h>
struct timeval {
time_t tv_sec; /* Seconds */
suseconds_t tv_usec; /* Microseconds */
};
DESCRIPTION
Describes times in seconds and microseconds.
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001.
NOTES
The following headers also provide this type: <sys/resource.h>, <sys/select.h>, and <utmpx.h>.
SEE ALSO
gettimeofday(2), select(2), utimes(2), adjtime(3), futimes(3), timeradd(3), suseconds_t(3type), time_t(3type), timespec(3type)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
40 - Linux cli command Mail_Fieldpm
NAME 🖥️ Mail_Fieldpm 🖥️
base-class for manipulation of mail header fields
INHERITANCE
Mail::Field is extended by Mail::Field::AddrList Mail::Field::Date Mail::Field::Generic
SYNOPSIS
use Mail::Field; my $field = Mail::Field->new(Subject, some subject text); my $field = Mail::Field->new(Subject => some subject text); print $field->tag,": “,$field->stringify,” “; my $field = Mail::Field->subject(some subject text);
DESCRIPTION
Mail::Field
creates and manipulates fields in MIME headers, collected within a Mail::Header object. Different field types have their own sub-class (extension), defining additional useful accessors to the field content.
People are invited to merge their implementation to special fields into MailTools, to maintain a consistent set of packages and documentation.
METHODS
Constructors
Mail::Field (and it’s sub-classes) define several methods which return new objects. These can all be categorized as constructor.
Mail::Field->combine($fields)
Take a LIST of Mail::Field
objects (which should all be of the same sub-class) and create a new object in that same class.
Mail::Field->extract( $tag, $head [, $index ] )
Takes as arguments the tag name, a Mail::Head
object and optionally an index. If the index argument is given then extract
will retrieve the given tag from the Mail::Head
object and create a new Mail::Field
based object. undef will be returned in the field does not exist. If the index argument is not given the result depends on the context in which extract
is called. If called in a scalar context the result will be as if extract
was called with an index value of zero. If called in an array context then all tags will be retrieved and a list of Mail::Field
objects will be returned.
Mail::Field->new( $tag [, STRING | %options] )
Create an object in the class which defines the field specified by the $tag
argument.
“Fake” constructors
$obj->create(%options)
This constructor is used internally with preprocessed field information. When called on an existing object, its original content will get replaced.
$obj->parse()
Parse a field line.
Accessors
$obj->set(%options)
Change the settings (the content, but then smart) of this field.
$obj->stringify()
Returns the field as a string.
$obj->tag()
Mail::Field->tag()
Return the tag (in the correct case) for this item. Well, actually any casing is OK, because the field tags are treated case-insensitive; however people have some preferences.
Smart accessors
$obj->text( [STRING] )
Without arguments, the field is returned as stringify() does. Otherwise, the STRING is parsed with parse() to replace the object’s content. It is more clear to call either stringify() or parse() directly, because this method does not add additional processing.
DETAILS
SUB-CLASS PACKAGE NAMES
All sub-classes should be called Mail::Field::name where name is derived from the tag using these rules.
Consider a tag as being made up of elements separated by ‘-’
Convert all characters to lowercase except the first in each element, which should be uppercase.
name is then created from these elements by using the first N characters from each element.
N is calculated by using the formula :- int((7 + #elements) / #elements)
name is then limited to a maximum of 8 characters, keeping the first 8 characters.
For an example of this take a look at the definition of the _header_pkg_name()
subroutine in Mail::Field
DIAGNOSTICS
Error: Undefined subroutine <method> called
Mail::Field objects use autoloading to compile new functionality. Apparently, the method called is not implemented for the specific class of the field object.
SEE ALSO
This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.
AUTHORS
The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.
Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.
LICENSE
Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
41 - Linux cli command PA_FLAG_SHORTconst
NAME 🖥️ PA_FLAG_SHORTconst 🖥️
define custom behavior for printf-like functions
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);
Callbacks
typedef int printf_function(FILE *stream, const struct printf_info *info,
const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);
Types
struct printf_info {
int prec; // Precision
int width; // Width
wchar_t spec; // Format letter
unsigned int is_long_double:1;// L or ll flag
unsigned int is_short:1; // h flag
unsigned int is_long:1; // l flag
unsigned int alt:1; // # flag
unsigned int space:1; // Space flag
unsigned int left:1; // - flag
unsigned int showsign:1; // + flag
unsigned int group:1; // ' flag
unsigned int extra:1; // For special use
unsigned int is_char:1; // hh flag
unsigned int wide:1; // True for wide character streams
unsigned int i18n:1; // I flag
unsigned int is_binary128:1; /* Floating-point argument is
ABI-compatible with
IEC 60559 binary128 */
unsigned short user; // Bits for user-installed modifiers
wchar_t pad; // Padding character
};
Constants
#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */
DESCRIPTION
These functions serve to extend and/or modify the behavior of the printf(3) family of functions.
register_printf_specifier()
This function registers a custom conversion specifier for the printf(3) family of functions.
spec
The character which will be used as a conversion specifier in the format string.
func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.
stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.
info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.
args
Array of pointers to the arguments to the printf(3) -like function.
arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.
info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.
n
Number of arguments remaining to be parsed.
argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).
The type is determined by using one of the following constants:
PA_INT
int.
PA_CHAR
int, cast to char.
PA_WCHAR
wchar_t.
PA_STRING
const char *, a ‘�’-terminated string.
PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.
PA_POINTER
void *.
PA_FLOAT
float.
PA_DOUBLE
double.
PA_LAST
TODO.
size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.
arginfo is called before func, and prepares some information needed to call func.
register_printf_modifier()
TODO
register_printf_type()
TODO
RETURN VALUE
register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.
Callbacks
The callback of type printf_function should return the number of characters written, or -1 on error.
The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.
ERRORS
EINVAL
The specifier was not a valid character.
STANDARDS
GNU.
HISTORY
register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.
register_printf_specifier() supersedes register_printf_function(3).
EXAMPLES
The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.
/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP '\''
struct Printf_Pad {
char ch;
size_t len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
const struct printf_info *info,
const char bin[UINTMAX_WIDTH],
size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
printf("....----....----....----....----
“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }
SEE ALSO
asprintf(3), printf(3), wprintf(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
42 - Linux cli command putw
NAME 🖥️ putw 🖥️
input and output of words (ints)
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdio.h>
int getw(FILE *stream);
int putw(int w, FILE *stream);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getw(), putw():
Since glibc 2.3.3:
_XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
|| /* glibc >= 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
Before glibc 2.3.3:
_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE
DESCRIPTION
getw() reads a word (that is, an int) from stream. It’s provided for compatibility with SVr4. We recommend you use fread(3) instead.
putw() writes the word w (that is, an int) to stream. It is provided for compatibility with SVr4, but we recommend you use fwrite(3) instead.
RETURN VALUE
Normally, getw() returns the word read, and putw() returns 0. On error, they return EOF.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
getw(), putw() | Thread safety | MT-Safe |
STANDARDS
None.
HISTORY
SVr4, SUSv2.
BUGS
The value returned on error is also a legitimate data value. ferror(3) can be used to distinguish between the two cases.
SEE ALSO
ferror(3), fread(3), fwrite(3), getc(3), putc(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
43 - Linux cli command XauWriteAuth
NAME 🖥️ XauWriteAuth 🖥️
X authority database routines
SYNOPSIS
#include <X11/Xauth.h>
typedef struct xauth {
unsigned short family;
unsigned short address_length;
char *address;
unsigned short number_length;
char *number;
unsigned short name_length;
char *name;
unsigned short data_length;
char *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );
DESCRIPTION
XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.
XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.
XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.
XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.
XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.
XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:
LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.
LOCK_TIMEOUT
retries attempts failed
LOCK_SUCCESS
The lock succeeded.
XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.
XauDisposeAuth frees storage allocated to hold an authorization entry.
SEE ALSO
xauth(1), xdm(1)
AUTHOR
Keith Packard, MIT X Consortium
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
44 - Linux cli command zip_register_progress_callback
libzip (-lzip)
The function
is the obsolete version of
The
function registers a callback function
for the zip archive
This function is called during
after every zip archive entry that’s completely written to disk. The value is a
in the range from 0.0 to 1.0. This can be used to provide progress indicators for user interfaces.
was added in libzip 1.2.0. It was deprecated in libzip 1.3.0, use
instead.
and
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
45 - Linux cli command vwarn
NAME 🖥️ vwarn 🖥️
formatted error messages
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <err.h>
[[noreturn]] void err(int eval, const char *fmt, ...);
[[noreturn]] void errx(int eval, const char *fmt, ...);
void warn(const char *fmt, ...);
void warnx(const char *fmt, ...);
#include <stdarg.h>
[[noreturn]] void verr(int eval, const char *fmt, va_list args);
[[noreturn]] void verrx(int eval, const char *fmt, va_list args);
void vwarn(const char *fmt, va_list args);
void vwarnx(const char *fmt, va_list args);
DESCRIPTION
The err() and warn() family of functions display a formatted error message on the standard error output. In all cases, the last component of the program name, a colon character, and a space are output. If the fmt argument is not NULL, the printf(3)-like formatted error message is output. The output is terminated by a newline character.
The err(), verr(), warn(), and vwarn() functions append an error message obtained from strerror(3) based on the global variable errno, preceded by another colon and space unless the fmt argument is NULL.
The errx() and warnx() functions do not append an error message.
The err(), verr(), errx(), and verrx() functions do not return, but exit with the value of the argument eval.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx() | Thread safety | MT-Safe locale |
STANDARDS
BSD.
HISTORY
err()
warn()
4.4BSD.
EXAMPLES
Display the current errno information string and exit:
p = malloc(size);
if (p == NULL)
err(EXIT_FAILURE, NULL);
fd = open(file_name, O_RDONLY, 0);
if (fd == -1)
err(EXIT_FAILURE, "%s", file_name);
Display an error message and exit:
if (tm.tm_hour < START_TIME)
errx(EXIT_FAILURE, "too early, wait until %s",
start_time_string);
Warn of an error:
fd = open(raw_device, O_RDONLY, 0);
if (fd == -1)
warnx("%s: %s: trying the block device",
raw_device, strerror(errno));
fd = open(block_device, O_RDONLY, 0);
if (fd == -1)
err(EXIT_FAILURE, "%s", block_device);
SEE ALSO
error(3), exit(3), perror(3), printf(3), strerror(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
46 - Linux cli command freopen
NAME 🖥️ freopen 🖥️
stream open functions
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdio.h>
FILE *fopen(const char *restrict pathname",constchar*restrict"mode);
FILE *fdopen(int fd, const char *mode);
FILE *freopen(const char *restrict pathname",constchar*restrict"mode,
FILE *restrict stream);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
fdopen():
_POSIX_C_SOURCE
DESCRIPTION
The fopen() function opens the file whose name is the string pointed to by pathname and associates a stream with it.
The argument mode points to a string beginning with one of the following sequences (possibly followed by additional characters, as described below):
r
Open text file for reading. The stream is positioned at the beginning of the file.
r+
Open for reading and writing. The stream is positioned at the beginning of the file.
w
Truncate file to zero length or create text file for writing. The stream is positioned at the beginning of the file.
w+
Open for reading and writing. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.
a
Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file.
a+
Open for reading and appending (writing at end of file). The file is created if it does not exist. Output is always appended to the end of the file. POSIX is silent on what the initial read position is when using this mode. For glibc, the initial file position for reading is at the beginning of the file, but for Android/BSD/MacOS, the initial file position for reading is at the end of the file.
The mode string can also include the letter ‘b’ either as a last character or as a character between the characters in any of the two-character strings described above. This is strictly for compatibility with ISO C and has no effect; the ‘b’ is ignored on all POSIX conforming systems, including Linux. (Other systems may treat text files and binary files differently, and adding the ‘b’ may be a good idea if you do I/O to a binary file and expect that your program may be ported to non-UNIX environments.)
See NOTES below for details of glibc extensions for mode.
Any created file will have the mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH (0666), as modified by the process’s umask value (see umask(2)).
Reads and writes may be intermixed on read/write streams in any order. Note that ANSI C requires that a file positioning function intervene between output and input, unless an input operation encounters end-of-file. (If this condition is not met, then a read is allowed to return the result of writes other than the most recent.) Therefore it is good practice (and indeed sometimes necessary under Linux) to put an fseek(3) or fsetpos(3) operation between write and read operations on such a stream. This operation may be an apparent no-op (as in fseek(…, 0L, SEEK_CUR) called for its synchronizing side effect).
Opening a file in append mode (a as the first character of mode) causes all subsequent write operations to this stream to occur at end-of-file, as if preceded by the call:
fseek(stream, 0, SEEK_END);
The file descriptor associated with the stream is opened as if by a call to open(2) with the following flags:
fopen() mode open() flags r O_RDONLY w O_WRONLY | O_CREAT | O_TRUNC a O_WRONLY | O_CREAT | O_APPEND r+ O_RDWR w+ O_RDWR | O_CREAT | O_TRUNC a+ O_RDWR | O_CREAT | O_APPEND
fdopen()
The fdopen() function associates a stream with the existing file descriptor, fd. The mode of the stream (one of the values “r”, “r+”, “w”, “w+”, “a”, “a+”) must be compatible with the mode of the file descriptor. The file position indicator of the new stream is set to that belonging to fd, and the error and end-of-file indicators are cleared. Modes “w” or “w+” do not cause truncation of the file. The file descriptor is not dup’ed, and will be closed when the stream created by fdopen() is closed. The result of applying fdopen() to a shared memory object is undefined.
freopen()
The freopen() function opens the file whose name is the string pointed to by pathname and associates the stream pointed to by stream with it. The original stream (if it exists) is closed. The mode argument is used just as in the fopen() function.
If the pathname argument is a null pointer, freopen() changes the mode of the stream to that specified in mode; that is, freopen() reopens the pathname that is associated with the stream. The specification for this behavior was added in the C99 standard, which says:
In this case, the file descriptor associated with the stream need not be closed if the call to freopen() succeeds. It is implementation-defined which changes of mode are permitted (if any), and under what circumstances.
The primary use of the freopen() function is to change the file associated with a standard text stream (stderr, stdin, or stdout).
RETURN VALUE
Upon successful completion fopen(), fdopen(), and freopen() return a FILE pointer. Otherwise, NULL is returned and errno is set to indicate the error.
ERRORS
EINVAL
The mode provided to fopen(), fdopen(), or freopen() was invalid.
The fopen(), fdopen(), and freopen() functions may also fail and set errno for any of the errors specified for the routine malloc(3).
The fopen() function may also fail and set errno for any of the errors specified for the routine open(2).
The fdopen() function may also fail and set errno for any of the errors specified for the routine fcntl(2).
The freopen() function may also fail and set errno for any of the errors specified for the routines open(2), fclose(3), and fflush(3).
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
fopen(), fdopen(), freopen() | Thread safety | MT-Safe |
STANDARDS
fopen()
freopen()
C11, POSIX.1-2008.
fdopen()
POSIX.1-2008.
HISTORY
fopen()
freopen()
POSIX.1-2001, C89.
fdopen()
POSIX.1-2001.
NOTES
glibc notes
The GNU C library allows the following extensions for the string specified in mode:
c (since glibc 2.3.3)
Do not make the open operation, or subsequent read and write operations, thread cancelation points. This flag is ignored for fdopen().
e (since glibc 2.7)
Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen().
m (since glibc 2.3)
Attempt to access the file using mmap(2), rather than I/O system calls (read(2), write(2)). Currently, use of mmap(2) is attempted only for a file opened for reading.
x
Open the file exclusively (like the O_EXCL flag of open(2)). If the file already exists, fopen() fails, and sets errno to EEXIST. This flag is ignored for fdopen().
In addition to the above characters, fopen() and freopen() support the following syntax in mode:
** ,ccs=**string
The given string is taken as the name of a coded character set and the stream is marked as wide-oriented. Thereafter, internal conversion functions convert I/O to and from the character set string. If the **,ccs=**string syntax is not specified, then the wide-orientation of the stream is determined by the first file operation. If that operation is a wide-character operation, the stream is marked wide-oriented, and functions to convert to the coded character set are loaded.
BUGS
When parsing for individual flag characters in mode (i.e., the characters preceding the “ccs” specification), the glibc implementation of fopen() and freopen() limits the number of characters examined in mode to 7 (or, before glibc 2.14, to 6, which was not enough to include possible specifications such as “rb+cmxe”). The current implementation of fdopen() parses at most 5 characters in mode.
SEE ALSO
open(2), fclose(3), fileno(3), fmemopen(3), fopencookie(3), open_memstream(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
47 - Linux cli command Net_DBus_Annotationpm
NAME 🖥️ Net_DBus_Annotationpm 🖥️
annotations for changing behaviour of APIs
SYNOPSIS
use Net::DBus::Annotation qw(:call); my $object = $service->get_object("/org/example/systemMonitor"); # Block until processes are listed my $processes = $object->list_processes(“someuser”); # Just throw away list of processes, pretty pointless # in this example, but useful if the method doesnt have # a return value $object->list_processes(dbus_call_noreply, “someuser”); # List processes & get on with other work until # the list is returned. my $asyncreply = $object->list_processes(dbus_call_async, “someuser”); … some time later… my $processes = $asyncreply->get_data; # List processes, with a shorter 10 second timeout, instead of # the default 60 seconds my $object->list_processes(dbus_call_timeout, 10 * 1000, “someuser”);
DESCRIPTION
This module provides a number of annotations which will be useful when dealing with the DBus APIs. There are annotations for switching remote calls between sync, async and no-reply mode. More annotations may be added over time.
METHODS
dbus_call_sync
Requests that a method call be performed synchronously, waiting for the reply or error return to be received before continuing.
dbus_call_async
Requests that a method call be performed a-synchronously, returning a pending call object, which will collect the reply when it eventually arrives.
dbus_call_noreply
Requests that a method call be performed a-synchronously, discarding any possible reply or error message.
dbus_call_timeout
Indicates that the next parameter for the method call will specify the time to wait for a reply in milliseconds. If omitted, then the default timeout for the object will be used
AUTHOR
Daniel Berrange <[email protected]>
COPYRIGHT
Copright (C) 2006-2011, Daniel Berrange.
SEE ALSO
Net::DBus, Net::DBus::RemoteObject
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
48 - Linux cli command Regexp_Common_URI_waispm
NAME 🖥️ Regexp_Common_URI_waispm 🖥️
- Returns a pattern for WAIS URIs.
SYNOPSIS
use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{WAIS}/ and print “Contains a WAIS URI. “; }
DESCRIPTION
$RE{URI}{WAIS}
Returns a pattern that matches WAIS URIs, as defined by RFC 1738. WAIS URIs have the form:
“wais:” “//” host [ “:” port ] “/” database [ ( “?” search ) | ( “/” wtype “/” wpath ) ]
Under {-keep}
, the following are returned:
$1
The complete URI.
$2
The scheme.
$3
The hostname.
$4
The port, if given.
$5
The database, followed by search or wtype/wpath, if given.
$6
The database.
$7
The part following the database if given, including the question mark or slash.
$8
The search part, if given.
$9
The wtype, if given.
$10
The wpath, if given.
REFERENCES
[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.
SEE ALSO
Regexp::Common::URI for other supported URIs.
AUTHOR
Damian Conway ([email protected])
MAINTENANCE
This package is maintained by Abigail ([email protected]).
BUGS AND IRRITATIONS
Bound to be plenty.
LICENSE and COPYRIGHT
This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.
This module is free software, and maybe used under any of the following licenses:
1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
49 - Linux cli command Tk_eventpm
NAME 🖥️ Tk_eventpm 🖥️
Miscellaneous event facilities: define virtual events and generate events
SYNOPSIS
$widget
->eventAction(?arg, arg, …?);
DESCRIPTION
The eventAction methods provides several facilities for dealing with window system events, such as defining virtual events and synthesizing events. Virtual events are shared by all widgets of the same MainWindow. Different MainWindows can have different virtual event.
The following methods are currently supported:
$widget->eventAdd(’<<virtual>>’, sequence ?,sequence, …?)
Associates the virtual event virtual with the physical event sequence(s) given by the sequence arguments, so that the virtual event will trigger whenever any one of the sequences occurs. Virtual may be any string value and sequence may have any of the values allowed for the sequence argument to the bind method. If virtual is already defined, the new physical event sequences add to the existing sequences for the event.
$widget->eventDelete(’<<virtual>>’ ?,sequence, sequence, …?)
Deletes each of the sequences from those associated with the virtual event given by virtual. Virtual may be any string value and sequence may have any of the values allowed for the sequence argument to the bind method. Any sequences not currently associated with virtual are ignored. If no sequence argument is provided, all physical event sequences are removed for virtual, so that the virtual event will not trigger anymore.
$widget->eventGenerate(event ?,option => value, option => value, …?)
Generates a window event and arranges for it to be processed just as if it had come from the window system. $window
is a reference to the window for which the event will be generated. Event provides a basic description of the event, such as <Shift-Button-2> or <<Paste>>. If Window is empty the whole screen is meant, and coordinates are relative to the screen. Event may have any of the forms allowed for the sequence argument of the bind method except that it must consist of a single event pattern, not a sequence. Option-value pairs may be used to specify additional attributes of the event, such as the x and y mouse position; see “EVENT FIELDS” below. If the -when option is not specified, the event is processed immediately: all of the handlers for the event will complete before the eventGenerate method returns. If the -when option is specified then it determines when the event is processed.
$widget->eventInfo(?’<<virtual>>’?)
Returns information about virtual events. If the <<virtual>> argument is omitted, the return value is a list of all the virtual events that are currently defined. If <<virtual>> is specified then the return value is a list whose elements are the physical event sequences currently defined for the given virtual event; if the virtual event is not defined then undef is returned.
EVENT FIELDS
The following options are supported for the eventGenerate method. These correspond to the ``%’’ expansions allowed in binding callback for the bind method.
-above => window
Window specifies the above field for the event, either as a window path name or as an integer window id. Valid for Configure events. Corresponds to the %a
substitution for binding scripts.
-borderwidth => size
Size must be a screen distance; it specifies the border_width field for the event. Valid for Configure events. Corresponds to the %B
substitution for binding scripts.
-button => number
Number must be an integer; it specifies the detail field for a ButtonPress or ButtonRelease event, overriding any button number provided in the base event argument. Corresponds to the %b
substitution for binding scripts.
-count => number
Number must be an integer; it specifies the count field for the event. Valid for Expose events. Corresponds to the %c
substitution for binding scripts.
-delta => number
number must be an integer; it specifies the delta field for the MouseWheel event. The delta refers to the direction and magnitude the mouse wheel was rotated. Note the value is not a screen distance but are units of motion in the mouse wheel. Typically these values are multiples of 120. For example, 120 should scroll the text widget up 4 lines and -240 would scroll the text widget down 8 lines. Of course, other widgets may define different behaviors for mouse wheel motion. This field corresponds to the %D
substitution for binding scripts.
-detail => detail
Detail specifies the detail field for the event and must be one of the following:
NotifyAncestor NotifyNonlinearVirtual NotifyDetailNone NotifyPointer NotifyInferior NotifyPointerRoot NotifyNonlinear NotifyVirtual
Valid for Enter, Leave, FocusIn and FocusOut events. Corresponds to the %d
substitution for binding scripts.
-focus boolean
Boolean must be a boolean value; it specifies the focus field for the event. Valid for Enter and Leave events. Corresponds to the %f
substitution for binding scripts.
-height size
Size must be a screen distance; it specifies the height field for the event. Valid for Configure events. Corresponds to the %h
substitution for binding scripts.
-keycode number
Number must be an integer; it specifies the keycode field for the event. Valid for KeyPress and KeyRelease events. Corresponds to the %k
substitution for binding scripts.
-keysym name
Name must be the name of a valid keysym, such as g, space, or Return; its corresponding keycode value is used as the keycode field for event, overriding any detail specified in the base event argument. Valid for KeyPress and KeyRelease events. Corresponds to the %K
substitution for binding scripts.
-mode notify
Notify specifies the mode field for the event and must be one of NotifyNormal, NotifyGrab, NotifyUngrab, or NotifyWhileGrabbed. Valid for Enter, Leave, FocusIn, and FocusOut events. Corresponds to the %m
substitution for binding scripts.
-override boolean
Boolean must be a boolean value; it specifies the override_redirect field for the event. Valid for Map, Reparent, and Configure events. Corresponds to the %o
substitution for binding scripts.
-place where
Where specifies the place field for the event; it must be either PlaceOnTop or PlaceOnBottom. Valid for Circulate events. Corresponds to the %p
substitution for binding scripts.
-root window
Window must be either a window path name or an integer window identifier; it specifies the root field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events. Corresponds to the %R
substitution for binding scripts.
-rootx coord
Coord must be a screen distance; it specifies the x_root field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events. Corresponds to the %X
substitution for binding scripts.
-rooty coord
Coord must be a screen distance; it specifies the y_root field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events. Corresponds to the %Y
substitution for binding scripts.
-sendevent boolean
Boolean must be a boolean value; it specifies the send_event field for the event. Valid for all events. Corresponds to the %E
substitution for binding scripts.
-serial number
Number must be an integer; it specifies the serial field for the event. Valid for all events. Corresponds to the %# substitution for binding scripts.
-state state
State specifies the state field for the event. For KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events it must be an integer value. For Visibility events it must be one of VisibilityUnobscured, VisibilityPartiallyObscured, or VisibilityFullyObscured. This option overrides any modifiers such as Meta or Control specified in the base event. Corresponds to the %s
substitution for binding scripts.
-subwindow window
Window specifies the subwindow field for the event, either as a path name for a Tk widget or as an integer window identifier. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events. Similar to %S
substitution for binding scripts.
-time integer
Integer must be an integer value; it specifies the time field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, Motion, and Property events. Corresponds to the %t
substitution for binding scripts.
-warp boolean
boolean must be a boolean value; it specifies whether the screen pointer should be warped as well. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, and Motion events.
-width size
Size must be a screen distance; it specifies the width field for the event. Valid for Configure events. Corresponds to the %w
substitution for binding scripts.
-when when
When determines when the event will be processed; it must have one of the following values:
now
Process the event immediately, before the command returns. This also happens if the -when option is omitted.
tail
Place the event on perl/Tk’s event queue behind any events already queued for this application.
head
Place the event at the front of perl/Tk’s event queue, so that it will be handled before any other events already queued.
mark
Place the event at the front of perl/Tk’s event queue but behind any other events already queued with -when mark. This option is useful when generating a series of events that should be processed in order but at the front of the queue.
-x coord
Coord must be a screen distance; it specifies the x field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Motion, Enter, Leave, Expose, Configure, Gravity, and Reparent events. Corresponds to the the %x
substitution for binding scripts. If Window is empty the coordinate is relative to the screen, and this option corresponds to the %X
substitution for binding scripts.
-y coord
Coord must be a screen distance; it specifies the y field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Motion, Enter, Leave, Expose, Configure, Gravity, and Reparent events. Corresponds to the the %y
substitution for binding scripts. If Window is empty the coordinate is relative to the screen, and this option corresponds to the %Y
substitution for binding scripts. Any options that are not specified when generating an event are filled with the value 0, except for serial, which is filled with the next X event serial number.
VIRTUAL EVENT EXAMPLES
In order for a virtual event binding to trigger, two things must happen. First, the virtual event must be defined with the eventAdd method. Second, a binding must be created for the virtual event with the bind method. Consider the following virtual event definitions:
$widget->eventAdd(<<Paste>> => <Control-y>); $widget->eventAdd(<<Paste>> => <Button-2>); $widget->eventAdd(<<Save>> => <Control-X><Control-S>); $widget->eventAdd(<<Save>> => <Shift-F12>);
In the bind method, a virtual event can be bound like any other builtin event type as follows:
$entry->bind(Tk::Entry, <<Paste>> => sub { $entry->Insert($entry->selectionGet) });
The double angle brackets are used to specify that a virtual event is being bound. If the user types Control-y or presses button 2, or if a <<Paste>> virtual event is synthesized with eventGenerate, then the <<Paste>> binding will be invoked.
If a virtual binding has the exact same sequence as a separate physical binding, then the physical binding will take precedence. Consider the following example:
$mw->eventAdd(<<Paste>> => <Control-y>,<Meta-Control-y>); $mw->bind(Tk::Entry, <Control-y> => sub{print Control-y}); $mw->bind(Tk::Entry, <<Paste>> => sub{print Paste});
When the user types Control-y the <Control-y> binding will be invoked, because a physical event is considered more specific than a virtual event, all other things being equal. However, when the user types Meta-Control-y the <<Paste>> binding will be invoked, because the Meta modifier in the physical pattern associated with the virtual binding is more specific than the <Control-y> sequence for the physical event.
Bindings on a virtual event may be created before the virtual event exists. Indeed, the virtual event never actually needs to be defined, for instance, on platforms where the specific virtual event would meaningless or ungeneratable.
When a definition of a virtual event changes at run time, all windows will respond immediately to the new definition. Starting from the preceding example, if the following code is executed:
$entry->bind(ref($entry), <Control-y> => undef); $entry->eventAdd(<<Paste>> => <Key-F6>);
the behavior will change such in two ways. First, the shadowed <<Paste>> binding will emerge. Typing Control-y will no longer invoke the <Control-y> binding, but instead invoke the virtual event <<Paste>>. Second, pressing the F6 key will now also invoke the <<Paste>> binding.
SEE ALSO
Tk::bind Tk::callbacks
KEYWORDS
event, binding, define, handle, virtual event
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
50 - Linux cli command pthread_cleanup_pop
NAME 🖥️ pthread_cleanup_pop 🖥️
push and pop thread cancelation clean-up handlers
LIBRARY
POSIX threads library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h>
void pthread_cleanup_push(void (*routine)(void *), void *arg);
void pthread_cleanup_pop(int execute);
DESCRIPTION
These functions manipulate the calling thread’s stack of thread-cancelation clean-up handlers. A clean-up handler is a function that is automatically executed when a thread is canceled (or in various other circumstances described below); it might, for example, unlock a mutex so that it becomes available to other threads in the process.
The pthread_cleanup_push() function pushes routine onto the top of the stack of clean-up handlers. When routine is later invoked, it will be given arg as its argument.
The pthread_cleanup_pop() function removes the routine at the top of the stack of clean-up handlers, and optionally executes it if execute is nonzero.
A cancelation clean-up handler is popped from the stack and executed in the following circumstances:
When a thread is canceled, all of the stacked clean-up handlers are popped and executed in the reverse of the order in which they were pushed onto the stack.
When a thread terminates by calling pthread_exit(3), all clean-up handlers are executed as described in the preceding point. (Clean-up handlers are not called if the thread terminates by performing a return from the thread start function.)
When a thread calls pthread_cleanup_pop() with a nonzero execute argument, the top-most clean-up handler is popped and executed.
POSIX.1 permits pthread_cleanup_push() and pthread_cleanup_pop() to be implemented as macros that expand to text containing ‘{’ and ‘}’, respectively. For this reason, the caller must ensure that calls to these functions are paired within the same function, and at the same lexical nesting level. (In other words, a clean-up handler is established only during the execution of a specified section of code.)
Calling longjmp(3) (siglongjmp(3)) produces undefined results if any call has been made to pthread_cleanup_push() or pthread_cleanup_pop() without the matching call of the pair since the jump buffer was filled by setjmp(3) (sigsetjmp(3)). Likewise, calling longjmp(3) (siglongjmp(3)) from inside a clean-up handler produces undefined results unless the jump buffer was also filled by setjmp(3) (sigsetjmp(3)) inside the handler.
RETURN VALUE
These functions do not return a value.
ERRORS
There are no errors.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
pthread_cleanup_push(), pthread_cleanup_pop() | Thread safety | MT-Safe |
VERSIONS
On glibc, the pthread_cleanup_push() and pthread_cleanup_pop() functions are implemented as macros that expand to text containing ‘{’ and ‘}’, respectively. This means that variables declared within the scope of paired calls to these functions will be visible within only that scope.
POSIX.1 says that the effect of using return, break, continue, or goto to prematurely leave a block bracketed pthread_cleanup_push() and pthread_cleanup_pop() is undefined. Portable applications should avoid doing this.
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001. glibc 2.0.
EXAMPLES
The program below provides a simple example of the use of the functions described in this page. The program creates a thread that executes a loop bracketed by pthread_cleanup_push() and pthread_cleanup_pop(). This loop increments a global variable, cnt, once each second. Depending on what command-line arguments are supplied, the main thread sends the other thread a cancelation request, or sets a global variable that causes the other thread to exit its loop and terminate normally (by doing a return).
In the following shell session, the main thread sends a cancelation request to the other thread:
$ ./a.out
New thread started
cnt = 0
cnt = 1
Canceling thread
Called clean-up handler
Thread was canceled; cnt = 0
From the above, we see that the thread was canceled, and that the cancelation clean-up handler was called and it reset the value of the global variable cnt to 0.
In the next run, the main program sets a global variable that causes other thread to terminate normally:
$ ./a.out x
New thread started
cnt = 0
cnt = 1
Thread terminated normally; cnt = 2
From the above, we see that the clean-up handler was not executed (because cleanup_pop_arg was 0), and therefore the value of cnt was not reset.
In the next run, the main program sets a global variable that causes the other thread to terminate normally, and supplies a nonzero value for cleanup_pop_arg:
$ ./a.out x 1
New thread started
cnt = 0
cnt = 1
Called clean-up handler
Thread terminated normally; cnt = 0
In the above, we see that although the thread was not canceled, the clean-up handler was executed, because the argument given to pthread_cleanup_pop() was nonzero.
Program source
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static int done = 0;
static int cleanup_pop_arg = 0;
static int cnt = 0;
static void
cleanup_handler(void *arg)
{
printf("Called clean-up handler
“); cnt = 0; } static void * thread_start(void arg) { time_t curr; printf(“New thread started “); pthread_cleanup_push(cleanup_handler, NULL); curr = time(NULL); while (!done) { pthread_testcancel(); / A cancelation point / if (curr < time(NULL)) { curr = time(NULL); printf(“cnt = %d “, cnt); / A cancelation point */ cnt++; } } pthread_cleanup_pop(cleanup_pop_arg); return NULL; } int main(int argc, char *argv[]) { pthread_t thr; int s; void res; s = pthread_create(&thr, NULL, thread_start, NULL); if (s != 0) handle_error_en(s, “pthread_create”); sleep(2); / Allow new thread to run a while */ if (argc > 1) { if (argc > 2) cleanup_pop_arg = atoi(argv[2]); done = 1; } else { printf(“Canceling thread “); s = pthread_cancel(thr); if (s != 0) handle_error_en(s, “pthread_cancel”); } s = pthread_join(thr, &res); if (s != 0) handle_error_en(s, “pthread_join”); if (res == PTHREAD_CANCELED) printf(“Thread was canceled; cnt = %d “, cnt); else printf(“Thread terminated normally; cnt = %d “, cnt); exit(EXIT_SUCCESS); }
SEE ALSO
pthread_cancel(3), pthread_cleanup_push_defer_np(3), pthread_setcancelstate(3), pthread_testcancel(3), pthreads(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
51 - Linux cli command X11_Protocol_Connection_INETFHpm
NAME 🖥️ X11_Protocol_Connection_INETFHpm 🖥️
Perl module for FileHandle-based TCP/IP X11 connections
SYNOPSIS
use X11::Protocol; use X11::Protocol::Connection::INETFH; $conn = X11::Protocol::Connection::INETFH ->open($host, $display_number); $x = X11::Protocol->new($conn);
DESCRIPTION
This module is used by X11::Protocol to establish a connection and communicate with a server over an internet-type TCP/IP socket connection, using the FileHandle module.
AUTHOR
Stephen McCamant <[email protected]>.
SEE ALSO
perl (1), X11::Protocol, X11::Protocol::Connection::UNIXFH, X11::Protocol::Connection::FileHandle, FileHandle.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
52 - Linux cli command zip_source_make_command_bitmap
libzip (-lzip)
The
function returns a bitmap of source commands suitable as return value for
It includes all the commands from the argument list, which must be terminated by -1.
was added in libzip 1.0.
and
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
53 - Linux cli command strcasecmp
NAME 🖥️ strcasecmp 🖥️
compare two strings ignoring case
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <strings.h>
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char s1[.n], const char s2[.n], size_t n);
DESCRIPTION
The strcasecmp() function performs a byte-by-byte comparison of the strings s1 and s2, ignoring the case of the characters. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
The strncasecmp() function is similar, except that it compares no more than n bytes of s1 and s2.
RETURN VALUE
The strcasecmp() and strncasecmp() functions return an integer less than, equal to, or greater than zero if s1 is, after ignoring case, found to be less than, to match, or be greater than s2, respectively.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
strcasecmp(), strncasecmp() | Thread safety | MT-Safe locale |
STANDARDS
POSIX.1-2008.
HISTORY
4.4BSD, POSIX.1-2001.
The strcasecmp() and strncasecmp() functions first appeared in 4.4BSD, where they were declared in <string.h>. Thus, for reasons of historical compatibility, the glibc <string.h> header file also declares these functions, if the _DEFAULT_SOURCE (or, in glibc 2.19 and earlier, _BSD_SOURCE) feature test macro is defined.
The POSIX.1-2008 standard says of these functions:
When the LC_CTYPE category of the locale being used is from the POSIX locale, these functions shall behave as if the strings had been converted to lowercase and then a byte comparison performed. Otherwise, the results are unspecified.
SEE ALSO
memcmp(3), strcmp(3), strcoll(3), string(3), strncmp(3), wcscasecmp(3), wcsncasecmp(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
54 - Linux cli command uint16_ttype
NAME 🖥️ uint16_ttype 🖥️
fixed-width basic integer types
LIBRARY
Standard C library (libc)
SYNOPSIS
#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */
DESCRIPTION
intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.
uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.
According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.
The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).
The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.
The macros INTN**_MIN** expand to the minimum value that these types can hold.
The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.
The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.
STANDARDS
C11, POSIX.1-2008.
HISTORY
C99, POSIX.1-2001.
The [U]INTN**_WIDTH** macros were added in C23.
NOTES
The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.
SEE ALSO
intmax_t(3type), intptr_t(3type), printf(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
55 - Linux cli command Jcodepm
NAME 🖥️ Jcodepm 🖥️
Japanese Charset Handler
SYNOPSIS
use Jcode; # # traditional Jcode::convert(\str, $ocode, $icode, “z”); # or OOP! print Jcode->new($str)->h2z->tr($from, $to)->utf8;
DESCRIPTION
<Japanese document is now available as Jcode::Nihongo. >
Jcode.pm supports both object and traditional approach. With object approach, you can go like;
$iso_2022_jp = Jcode->new($str)->h2z->jis;
Which is more elegant than:
$iso_2022_jp = $str; &jcode::convert(\iso_2022_jp, jis, &jcode::getcode(\str), “z”);
For those unfamiliar with objects, Jcode.pm still supports getcode()
and convert().
If the perl version is 5.8.1, Jcode acts as a wrapper to Encode, the standard charset handler module for Perl 5.8 or later.
Methods
Methods mentioned here all return Jcode object unless otherwise mentioned.
Constructors
$j = Jcode->new($str [, $icode])
Creates Jcode object $j
from $str
. Input code is automatically checked unless you explicitly set $icode
. For available charset, see getcode below. For perl 5.8.1 or better, $icode
can be any encoding name that Encode understands. $j = Jcode->new($european, iso-latin1); When the object is stringified, it returns the EUC-converted string so you can <print $j
> instead of <print $j
->euc>.
Passing Reference
Instead of scalar value, You can use reference as Jcode->new(\str); This saves time a little bit. In exchange of the value of $str
being converted. (In a way, $str
is now tied to jcode object).
$j->set($str [, $icode])
Sets $j
’s internal string to $str
. Handy when you use Jcode object repeatedly (saves time and memory to create object). # converts mailbox to SJIS format my $jconv = new Jcode; $/ = 00; while(<>){ print $jconv->set(\_)->mime_decode->sjis; }
$j->append($str [, $icode]);
Appends $str
to $j
’s internal string.
$j = jcode($str [, $icode]);
shortcut for Jcode->new() so you can go like;
Encoded Strings
In general, you can retrieve encoded string as $j
->encoded.
$sjis = jcode($str)->sjis
$euc = $j->euc
$jis = $j->jis
$sjis = $j->sjis
$ucs2 = $j->ucs2
$utf8 = $j->utf8
What you code is what you get :)
$iso_2022_jp = $j->iso_2022_jp
Same as $j->h2z->jis
. Hankaku Kanas are forcibly converted to Zenkaku. For perl 5.8.1 and better, you can also use any encoding names and aliases that Encode supports. For example: $european = $j->iso_latin1; # replace - with _ for names. FYI: Encode::Encoder uses similar trick.
$j->fallback($fallback)
For perl is 5.8.1 or better, Jcode stores the internal string in UTF-8. Any character that does not map to ->encoding are replaced with a ‘?’, which is Encode standard. my $unistr = “\x{262f}”; # YIN YANG my $j = jcode($unistr); # $j->euc is ? You can change this behavior by specifying fallback like Encode. Values are the same as Encode. Jcode::FB_PERLQQ
, Jcode::FB_XMLCREF
, Jcode::FB_HTMLCREF
are aliased to those of Encode for convenice. print $j->fallback(Jcode::FB_PERLQQ)->euc; # \x{262f} print $j->fallback(Jcode::FB_XMLCREF)->euc; # ☯ print $j->fallback(Jcode::FB_HTMLCREF)->euc; # ☯ The global variable $Jcode::FALLBACK
stores the default fallback so you can override that by assigning the value. $Jcode::FALLBACK = Jcode::FB_PERLQQ; # set default fallback scheme
[@lines =] $jcode->jfold([$width, $newline_str, $kref])
folds lines in jcode string every $width
(default: 72) where $width
is the number of halfwidth character. Fullwidth Characters are counted as two. with a newline string spefied by $newline_str
(default:
). Rudimentary kinsoku suppport is now available for Perl 5.8.1 and better.
$length = $jcode->jlength();
returns character length properly, rather than byte length.
Methods that use MIME::Base64
To use methods below, you need MIME::Base64. To install, simply
perl -MCPAN -e CPAN::Shell->install(“MIME::Base64”)
If your perl is 5.6 or better, there is no need since MIME::Base64 is bundled.
$mime_header = $j->mime_encode([$lf, $bpl])
Converts $str
to MIME-Header documented in RFC1522. When $lf
is specified, it uses $lf
to fold line (default:
). When $bpl
is specified, it uses $bpl
for the number of bytes (default: 76; this number must be smaller than 76). For Perl 5.8.1 or better, you can also encode MIME Header as: $mime_header = $j->MIME_Header; In which case the resulting $mime_header
is MIME-B-encoded UTF-8 whereas $j->mime_encode()
returnes MIME-B-encoded ISO-2022-JP. Most modern MUAs support both.
$j->mime_decode;
Decodes MIME-Header in Jcode object. For perl 5.8.1 or better, you can also do the same as: Jcode->new($str, MIME-Header)
Hankaku vs. Zenkaku
$j->h2z([$keep_dakuten])
Converts X201 kana (Hankaku) to X208 kana (Zenkaku). When $keep_dakuten
is set, it leaves dakuten as is (That is, ka + dakuten is left as is instead of being converted to ga) You can retrieve the number of matches via $j
->nmatch;
$j->z2h
Converts X208 kana (Zenkaku) to X201 kana (Hankaku). You can retrieve the number of matches via $j
->nmatch;
Regexp emulators
To use ->m()
and ->s()
, you need perl 5.8.1 or better.
$j->tr($from, $to, $opt);
Applies tr/$from/$to/
on Jcode object where $from
and $to
are EUC-JP strings. On perl 5.8.1 or better, $from
and $to
can also be flagged UTF-8 strings. If $opt
is set, tr/$from/$to/$opt
is applied. $opt
must be ‘c’, ’d’ or the combination thereof. You can retrieve the number of matches via $j
->nmatch; The following methods are available only for perl 5.8.1 or better.
$j->s($patter, $replace, $opt);
Applies s/$pattern/$replace/$opt
. $pattern
and replace
must be in EUC-JP or flagged UTF-8. $opt
are the same as regexp options. See perlre for regexp options. Like $j->tr()
, $j->s()
returns the object itself so you can nest the operation as follows; $j->tr(“a-z”, “A-Z”)->s(“foo”, “bar”);
[@match = ] $j->m($pattern, $opt);
Applies m/$patter/$opt
. Note that this method DOES NOT RETURN AN OBJECT so you can’t chain the method like $j->s()
.
Instance Variables
If you need to access instance variables of Jcode object, use access methods below instead of directly accessing them (That’s what OOP is all about)
FYI, Jcode uses a ref to array instead of ref to hash (common way) to optimize speed (Actually you don’t have to know as long as you use access methods instead; Once again, that’s OOP)
$j->r_str
Reference to the EUC-coded String.
$j->icode
Input charcode in recent operation.
$j->nmatch
Number of matches (Used in $j
->tr, etc.)
Subroutines
($code, [$nmatch]) = getcode($str)
Returns char code of $str
. Return codes are as follows ascii Ascii (Contains no Japanese Code) binary Binary (Not Text File) euc EUC-JP sjis SHIFT_JIS jis JIS (ISO-2022-JP) ucs2 UCS2 (Raw Unicode) utf8 UTF8 When array context is used instead of scaler, it also returns how many character codes are found. As mentioned above, $str
can be \str instead. jcode.pl Users: This function is 100% upper-conpatible with jcode::getcode() Ω- well, almost; * When its return value is an array, the order is the opposite; jcode::getcode() returns $nmatch first. * jcode::getcode() returns undef when the number of EUC characters is equal to that of SJIS. Jcode::getcode() returns EUC. for Jcode.pm there is no in-betweens.
Jcode::convert($str, [$ocode, $icode, $opt])
Converts $str
to char code specified by $ocode
. When $icode
is specified also, it assumes $icode
for input string instead of the one checked by getcode(). As mentioned above, $str
can be \str instead. jcode.pl Users: This function is 100% upper-conpatible with jcode::convert() !
BUGS
For perl is 5.8.1 or later, Jcode acts as a wrapper to Encode. Meaning Jcode is subject to bugs therein.
ACKNOWLEDGEMENTS
This package owes a lot in motivation, design, and code, to the jcode.pl for Perl4 by Kazumasa Utashiro <[email protected]>.
Hiroki Ohzaki <[email protected]> has helped me polish regexp from the very first stage of development.
JEncode by [email protected] has inspired me to integrate Encode to Jcode. He has also contributed Japanese POD.
And folks at Jcode Mailing list <[email protected]>. Without them, I couldn’t have coded this far.
SEE ALSO
Encode
Jcode::Nihongo
<http://www.iana.org/assignments/character-sets>
COPYRIGHT
Copyright 1999-2005 Dan Kogai <[email protected]>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
56 - Linux cli command X11_Protocol_Connection_UNIXFHpm
NAME 🖥️ X11_Protocol_Connection_UNIXFHpm 🖥️
Perl module for FileHandle-based Unix-domain X11 connections
SYNOPSIS
use X11::Protocol; use X11::Protocol::Connection::UNIXFH; $conn = X11::Protocol::Connection::UNIXFH ->open($host, $display_number); $x = X11::Protocol->new($conn);
DESCRIPTION
This module is used by X11::Protocol to establish a connection and communicate with a server over a local Unix-domain socket connection, using the FileHandle module. The host argument is ignored.
AUTHOR
Stephen McCamant <[email protected]>.
SEE ALSO
perl (1), X11::Protocol, X11::Protocol::Connection::INETFH, X11::Protocol::Connection::FileHandle, FileHandle.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
57 - Linux cli command Image_ExifTool_Lang_plpm
NAME 🖥️ Image_ExifTool_Lang_plpm 🖥️
ExifTool Polish language translations
DESCRIPTION
This file is used by Image::ExifTool to generate localized tag descriptions and values.
AUTHOR
Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ACKNOWLEDGEMENTS
Thanks to Jens Duttke, Przemyslaw Sulek and Kacper Perschke for providing this translation.
SEE ALSO
Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
58 - Linux cli command pcap_fopen_offlinepcap
NAME 🖥️ pcap_fopen_offlinepcap 🖥️
open a saved capture file for reading
SYNOPSIS
#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *pcap_open_offline(const char *fname, char *errbuf);
pcap_t *pcap_open_offline_with_tstamp_precision(const char *fname,
u_int precision, char *errbuf);
pcap_t *pcap_fopen_offline(FILE *fp, char *errbuf);
pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *fp,
u_int precision, char *errbuf);
DESCRIPTION
pcap_open_offline() and pcap_open_offline_with_tstamp_precision() are called to open a ``savefile’’ for reading.
fname specifies the name of the file to open. The file can have the pcap file format as described in pcap-savefile(5), which is the file format used by, among other programs, tcpdump(1) and tcpslice(1), or can have the pcapng file format, although not all pcapng files can be read. The name “-” is a synonym for stdin.
pcap_open_offline_with_tstamp_precision() takes an additional precision argument specifying the time stamp precision desired; if PCAP_TSTAMP_PRECISION_MICRO is specified, packet time stamps will be supplied in seconds and microseconds, and if PCAP_TSTAMP_PRECISION_NANO is specified, packet time stamps will be supplied in seconds and nanoseconds. If the time stamps in the file do not have the same precision as the requested precision, they will be scaled up or down as necessary before being supplied.
Alternatively, you may call pcap_fopen_offline() or pcap_fopen_offline_with_tstamp_precision() to read dumped data from an existing open stream fp. pcap_fopen_offline_with_tstamp_precision() takes an additional precision argument as described above. Note that on Windows, that stream should be opened in binary mode.
RETURN VALUE
pcap_open_offline(), pcap_open_offline_with_tstamp_precision(), pcap_fopen_offline(), and pcap_fopen_offline_with_tstamp_precision() return a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.
BACKWARD COMPATIBILITY
pcap_open_offline_with_tstamp_precision() and pcap_fopen_offline_with_tstamp_precision() became available in libpcap release 1.5.1. In previous releases, time stamps from a savefile are always given in seconds and microseconds.
SEE ALSO
pcap(3PCAP), pcap-savefile(5)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
59 - Linux cli command IO_ScalarArraypm
NAME 🖥️ IO_ScalarArraypm 🖥️
IO:: interface for reading/writing an array of scalars
SYNOPSIS
Perform I/O on strings, using the basic OO interface…
use IO::ScalarArray; @data = (“My mes”, “sage: “); ### Open a handle on an array, and append to it: $AH = new IO::ScalarArray \data; $AH->print(“Hello”); $AH->print(”, world! Bye now! “); print “The array is now: “, @data, " “; ### Open a handle on an array, read it line-by-line, then close it: $AH = new IO::ScalarArray \data; while (defined($_ = $AH->getline)) { print “Got line: $_”; } $AH->close; ### Open a handle on an array, and slurp in all the lines: $AH = new IO::ScalarArray \data; print “All lines: “, $AH->getlines; ### Get the current position (either of two ways): $pos = $AH->getpos; $offset = $AH->tell; ### Set the current position (either of two ways): $AH->setpos($pos); $AH->seek($offset, 0); ### Open an anonymous temporary array: $AH = new IO::ScalarArray; $AH->print(“Hi there!”); print “I printed: “, @{$AH->aref}, " “; ### get at value
Don’t like OO for your I/O? No problem. Thanks to the magic of an invisible tie(), the following now works out of the box, just as it does with IO::Handle:
use IO::ScalarArray; @data = (“My mes”, “sage: “); ### Open a handle on an array, and append to it: $AH = new IO::ScalarArray \data; print $AH “Hello”; print $AH “, world! Bye now! “; print “The array is now: “, @data, " “; ### Open a handle on a string, read it line-by-line, then close it: $AH = new IO::ScalarArray \data; while (<$AH>) { print “Got line: $_”; } close $AH; ### Open a handle on a string, and slurp in all the lines: $AH = new IO::ScalarArray \data; print “All lines: “, <$AH>; ### Get the current position (WARNING: requires 5.6): $offset = tell $AH; ### Set the current position (WARNING: requires 5.6): seek $AH, $offset, 0; ### Open an anonymous temporary scalar: $AH = new IO::ScalarArray; print $AH “Hi there!”; print “I printed: “, @{$AH->aref}, " “; ### get at value
And for you folks with 1.x code out there: the old tie() style still works, though this is unnecessary and deprecated:
use IO::ScalarArray; ### Writing to a scalar… my @a; tie *OUT, IO::ScalarArray, \a; print OUT “line 1 line 2 “, “line 3 “; print “Array is now: “, @a, " " ### Reading and writing an anonymous scalar… tie *OUT, IO::ScalarArray; print OUT “line 1 line 2 “, “line 3 “; tied(OUT)->seek(0,0); while (<OUT>) { print “Got line: “, $_; }
DESCRIPTION
This class is part of the IO::Stringy distribution; see IO::Stringy for change log and general information.
The IO::ScalarArray class implements objects which behave just like IO::Handle (or FileHandle) objects, except that you may use them to write to (or read from) arrays of scalars. Logically, an array of scalars defines an in-core “file” whose contents are the concatenation of the scalars in the array. The handles created by this class are automatically tiehandle
d (though please see “WARNINGS” for information relevant to your Perl version).
For writing large amounts of data with individual print() statements, this class is likely to be more efficient than IO::Scalar.
Basically, this:
my @a; $AH = new IO::ScalarArray \a; $AH->print(“Hel”, “lo, “); ### OO style $AH->print(“world! “); ### ditto
Or this:
my @a; $AH = new IO::ScalarArray \a; print $AH “Hel”, “lo, “; ### non-OO style print $AH “world! “; ### ditto
Causes @a
to be set to the following array of 3 strings:
( “Hel” , “lo, " , “world! " )
See IO::Scalar and compare with this class.
PUBLIC INTERFACE
Construction
new [ARGS…]
Class method. Return a new, unattached array handle. If any arguments are given, they’re sent to open().
open [ARRAYREF]
Instance method. Open the array handle on a new array, pointed to by ARRAYREF. If no ARRAYREF is given, a “private” array is created to hold the file data. Returns the self object on success, undefined on error.
opened
Instance method. Is the array handle opened on something?
close
Instance method. Disassociate the array handle from its underlying array. Done automatically on destroy.
Input and output
flush
Instance method. No-op, provided for OO compatibility.
fileno
Instance method. No-op, returns undef
getc
Instance method. Return the next character, or undef if none remain. This does a read (1), which is somewhat costly.
getline
Instance method. Return the next line, or undef on end of data. Can safely be called in an array context. Currently, lines are delimited by "
“.
getlines
Instance method. Get all remaining lines. It will croak() if accidentally called in a scalar context.
print ARGS…
Instance method. Print ARGS to the underlying array. Currently, this always causes a “seek to the end of the array” and generates a new array entry. This may change in the future.
read BUF, NBYTES, [OFFSET];
Instance method. Read some bytes from the array. Returns the number of bytes actually read, 0 on end-of-file, undef on error.
write BUF, NBYTES, [OFFSET];
Instance method. Write some bytes into the array.
Seeking/telling and other attributes
autoflush
Instance method. No-op, provided for OO compatibility.
binmode
Instance method. No-op, provided for OO compatibility.
clearerr
Instance method. Clear the error and EOF flags. A no-op.
eof
Instance method. Are we at end of file?
seek POS,WHENCE
Instance method. Seek to a given position in the stream. Only a WHENCE of 0 (SEEK_SET) is supported.
tell
Instance method. Return the current position in the stream, as a numeric offset.
setpos POS
Instance method. Seek to a given position in the array, using the opaque getpos() value. Don’t expect this to be a number.
getpos
Instance method. Return the current position in the array, as an opaque value. Don’t expect this to be a number.
aref
Instance method. Return a reference to the underlying array.
AUTHOR
Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).
CONTRIBUTORS
Dianne Skoll ([email protected]).
COPYRIGHT & LICENSE
Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
60 - Linux cli command scalbnl
NAME 🖥️ scalbnl 🖥️
multiply floating-point number by integral power of radix
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double scalbln(double x, long exp);
float scalblnf(float x, long exp);
long double scalblnl(long double x, long exp);
double scalbn(double x, int exp);
float scalbnf(float x, int exp);
long double scalbnl(long double x, int exp);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
scalbln(), scalblnf(), scalblnl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
scalbn(), scalbnf(), scalbnl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:
x * FLT_RADIX ** exp
The definition of FLT_RADIX can be obtained by including <float.h>.
RETURN VALUE
On success, these functions return x * FLT_RADIX ** exp.
If x is a NaN, a NaN is returned.
If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.
If x is +0 (-0), +0 (-0) is returned.
If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.
If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.
ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions.
The following errors can occur:
Range error, overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.
Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
glibc 2.1. C99, POSIX.1-2001.
HISTORY
These functions differ from the obsolete functions described in scalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those in scalb(3) have a second argument of type double.
NOTES
If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to ldexp(3).
BUGS
Before glibc 2.20, these functions did not set errno for range errors.
SEE ALSO
ldexp(3), scalb(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
61 - Linux cli command svc_getreq
NAME 🖥️ svc_getreq 🖥️
library routines for remote procedure calls
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS AND DESCRIPTION
These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.
To take use of these routines, include the header file <rpc/rpc.h>.
The prototypes below make use of the following types:
typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);
See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.
void auth_destroy(AUTH *auth);
A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().
AUTH *authnone_create(void);
Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.
AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
int len, gid_t aup_gids[.len]);
Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.
AUTH *authunix_create_default(void);
Calls authunix_create() with the appropriate parameters.
int callrpc(char *host, unsigned long prognum,
unsigned long versnum, unsigned long procnum,
xdrproc_t inproc, const char *in,
xdrproc_t outproc, char *out);
Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.
Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.
enum clnt_stat clnt_broadcast(unsigned long prognum,
unsigned long versnum, unsigned long procnum,
xdrproc_t inproc, char *in,
xdrproc_t outproc, char *out,
resultproc_t eachresult);
Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:
eachresult(char *out, struct sockaddr_in *addr);
where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.
Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.
enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
xdrproc_t inproc, char *in,
xdrproc_t outproc, char *out,
struct timeval tout);
A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.
clnt_destroy(CLIENT *clnt);
A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.
CLIENT *clnt_create(const char *host, unsigned long prog,
unsigned long vers, const char *proto);
Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().
Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.
bool_t clnt_control(CLIENT *cl, int req, char *info);
A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:
CLSET_TIMEOUT struct timeval // set total timeout
CLGET_TIMEOUT struct timeval // get total timeout
Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.
CLGET_SERVER_ADDR struct sockaddr_in
// get server's address
The following operations are valid for UDP only:
CLSET_RETRY_TIMEOUT struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT struct timeval // get the retry timeout
The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.
clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);
A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.
void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);
A macro that copies the error structure out of the client handle to the structure at address errp.
void clnt_pcreateerror(const char *s);
Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.
void clnt_perrno(enum clnt_stat stat);
Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().
clnt_perror(CLIENT *clnt, const char *s);
Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().
char *clnt_spcreateerror(const char *s);
Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.
Bugs: returns pointer to static data that is overwritten on each call.
char *clnt_sperrno(enum clnt_stat stat);
Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.
clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.
char *clnt_sperror(CLIENT *rpch, const char *s);
Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.
Bugs: returns pointer to static data that is overwritten on each call.
CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);
This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.
CLIENT *clnttcp_create(struct sockaddr_in *addr,
unsigned long prognum, unsigned long versnum,
int *sockp, unsigned int sendsz",unsignedint"recvsz);
This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.
CLIENT *clntudp_create(struct sockaddr_in *addr,
unsigned long prognum, unsigned long versnum,
struct timeval wait, int *sockp);
This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().
Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.
CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
unsigned long prognum, unsigned long versnum,
struct timeval wait, int *sockp,
unsigned int sendsize, unsigned int recosize);
This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().
This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.
void get_myaddress(struct sockaddr_in *addr);
Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).
struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);
A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.
unsigned short pmap_getport(struct sockaddr_in *addr,
unsigned long prognum, unsigned long versnum,
unsigned int protocol);
A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.
enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
unsigned long prognum, unsigned long versnum,
unsigned long procnum,
xdrproc_t inproc, char *in,
xdrproc_t outproc, char *out,
struct timeval tout, unsigned long *portp);
A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().
bool_t pmap_set(unsigned long prognum, unsigned long versnum,
int protocol, unsigned short port);
A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().
bool_t pmap_unset(unsigned long prognum, unsigned long versnum);
A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.
int registerrpc(unsigned long prognum, unsigned long versnum,
unsigned long procnum, char *(*procname)(char *),
xdrproc_t inproc, xdrproc_t outproc);
Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.
Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.
struct rpc_createerr rpc_createerr;
A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.
void svc_destroy(SVCXPRT *xprt);
A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.
fd_set svc_fdset;
A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.
int svc_fds;
Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.
svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);
A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.
svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);
A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.
struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);
The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.
void svc_getreqset(fd_set *rdfds);
This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.
void svc_getreq(int rdfds);
Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().
bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
unsigned long versnum,
void (*dispatch)(struct svc_req *, SVCXPRT *),
unsigned long protocol);
Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:
dispatch(struct svc_req *request, SVCXPRT *xprt);
The svc_register() routine returns one if it succeeds, and zero otherwise.
void svc_run(void);
This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.
bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);
Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.
void svc_unregister(unsigned long prognum, unsigned long versnum);
Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.
void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);
Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.
void svcerr_decode(SVCXPRT *xprt);
Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().
void svcerr_noproc(SVCXPRT *xprt);
Called by a service dispatch routine that does not implement the procedure number that the caller requests.
void svcerr_noprog(SVCXPRT *xprt);
Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.
void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
unsigned long high_vers);
Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.
void svcerr_systemerr(SVCXPRT *xprt);
Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.
void svcerr_weakauth(SVCXPRT *xprt);
Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).
SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
unsigned int recvsize);
Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.
SVCXPRT *svcraw_create(void);
This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.
SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
unsigned int recv_buf_size);
This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.
SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
unsigned int recosize);
This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.
This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.
SVCXPRT *svcudp_create(int sock);
This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.
bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);
Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.
bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);
Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.
void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);
Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.
bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);
Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.
bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.
bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);
Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.
bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);
Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.
bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);
Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.
bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);
Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.
void xprt_register(SVCXPRT *xprt);
After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.
void xprt_unregister(SVCXPRT *xprt);
Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister() | Thread safety | MT-Safe |
SEE ALSO
xdr(3)
The following manuals:
Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide
RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
62 - Linux cli command Image_ExifTool_HTMLpm
NAME 🖥️ Image_ExifTool_HTMLpm 🖥️
Read HTML meta information
SYNOPSIS
This module is used by Image::ExifTool
DESCRIPTION
This module contains routines required by Image::ExifTool to extract meta information from HTML documents.
AUTHOR
Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
REFERENCES
<http://www.w3.org/TR/html4/>
<http://www.daisy.org/publications/specifications/daisy_202.html>
<http://vancouver-webpages.com/META/metatags.detail.html>
<http://www.html-reference.com/META.htm>
SEE ALSO
“HTML Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
63 - Linux cli command Image_ExifTool_VCardpm
NAME 🖥️ Image_ExifTool_VCardpm 🖥️
Read vCard and iCalendar meta information
SYNOPSIS
This module is used by Image::ExifTool
DESCRIPTION
This module contains definitions required by Image::ExifTool to read meta information from vCard VCF and iCalendar ICS files.
AUTHOR
Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
REFERENCES
<http://en.m.wikipedia.org/wiki/VCard>
<http://tools.ietf.org/html/rfc6350>
<http://tools.ietf.org/html/rfc5545>
SEE ALSO
“VCard Tags” in Image::ExifTool::TagNames, “VCard VCalendar Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
64 - Linux cli command posix_spawnp
NAME 🖥️ posix_spawnp 🖥️
spawn a process
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <spawn.h>
int posix_spawn(pid_t *restrict pid, const char *restrict path,
const posix_spawn_file_actions_t *restrict file_actions,
const posix_spawnattr_t *restrict attrp,
char *const argv[restrict],
char *const envp[restrict]);
int posix_spawnp(pid_t *restrict pid, const char *restrict file,
const posix_spawn_file_actions_t *restrict file_actions,
const posix_spawnattr_t *restrict attrp,
char *const argv[restrict],
char *const envp[restrict]);
DESCRIPTION
The posix_spawn() and posix_spawnp() functions are used to create a new child process that executes a specified file. These functions were specified by POSIX to provide a standardized method of creating new processes on machines that lack the capability to support the fork(2) system call. These machines are generally small, embedded systems lacking MMU support.
The posix_spawn() and posix_spawnp() functions provide the functionality of a combined fork(2) and exec(3), with some optional housekeeping steps in the child process before the exec(3). These functions are not meant to replace the fork(2) and execve(2) system calls. In fact, they provide only a subset of the functionality that can be achieved by using the system calls.
The only difference between posix_spawn() and posix_spawnp() is the manner in which they specify the file to be executed by the child process. With posix_spawn(), the executable file is specified as a pathname (which can be absolute or relative). With posix_spawnp(), the executable file is specified as a simple filename; the system searches for this file in the list of directories specified by PATH (in the same way as for execvp(3)). For the remainder of this page, the discussion is phrased in terms of posix_spawn(), with the understanding that posix_spawnp() differs only on the point just described.
The remaining arguments to these two functions are as follows:
pid
points to a buffer that is used to return the process ID of the new child process.
file_actions
points to a spawn file actions object that specifies file-related actions to be performed in the child between the fork(2) and exec(3) steps. This object is initialized and populated before the posix_spawn() call using posix_spawn_file_actions_init(3) and the posix_spawn_file_actions_*() functions.
attrp
points to an attributes objects that specifies various attributes of the created child process. This object is initialized and populated before the posix_spawn() call using posix_spawnattr_init(3) and the posix_spawnattr_*() functions.
argv
envp
specify the argument list and environment for the program that is executed in the child process, as for execve(2).
Below, the functions are described in terms of a three-step process: the fork() step, the pre-exec() step (executed in the child), and the exec() step (executed in the child).
fork() step
Since glibc 2.24, the posix_spawn() function commences by calling clone(2) with CLONE_VM and CLONE_VFORK flags. Older implementations use fork(2), or possibly vfork(2) (see below).
The PID of the new child process is placed in *pid. The posix_spawn() function then returns control to the parent process.
Subsequently, the parent can use one of the system calls described in wait(2) to check the status of the child process. If the child fails in any of the housekeeping steps described below, or fails to execute the desired file, it exits with a status of 127.
Before glibc 2.24, the child process is created using vfork(2) instead of fork(2) when either of the following is true:
the spawn-flags element of the attributes object pointed to by attrp contains the GNU-specific flag POSIX_SPAWN_USEVFORK; or
file_actions is NULL and the spawn-flags element of the attributes object pointed to by attrp does not contain POSIX_SPAWN_SETSIGMASK, POSIX_SPAWN_SETSIGDEF, POSIX_SPAWN_SETSCHEDPARAM, POSIX_SPAWN_SETSCHEDULER, POSIX_SPAWN_SETPGROUP, or POSIX_SPAWN_RESETIDS.
In other words, vfork(2) is used if the caller requests it, or if there is no cleanup expected in the child before it exec(3)s the requested file.
pre-exec() step: housekeeping
In between the fork() and the exec() steps, a child process may need to perform a set of housekeeping actions. The posix_spawn() and posix_spawnp() functions support a small, well-defined set of system tasks that the child process can accomplish before it executes the executable file. These operations are controlled by the attributes object pointed to by attrp and the file actions object pointed to by file_actions. In the child, processing is done in the following sequence:
Process attribute actions: signal mask, signal default handlers, scheduling algorithm and parameters, process group, and effective user and group IDs are changed as specified by the attributes object pointed to by attrp.
File actions, as specified in the file_actions argument, are performed in the order that they were specified using calls to the posix_spawn_file_actions_add*() functions.
File descriptors with the FD_CLOEXEC flag set are closed.
All process attributes in the child, other than those affected by attributes specified in the object pointed to by attrp and the file actions in the object pointed to by file_actions, will be affected as though the child was created with fork(2) and it executed the program with execve(2).
The process attributes actions are defined by the attributes object pointed to by attrp. The spawn-flags attribute (set using posix_spawnattr_setflags(3)) controls the general actions that occur, and other attributes in the object specify values to be used during those actions.
The effects of the flags that may be specified in spawn-flags are as follows:
POSIX_SPAWN_SETSIGMASK
Set the signal mask to the signal set specified in the spawn-sigmask attribute of the object pointed to by attrp. If the POSIX_SPAWN_SETSIGMASK flag is not set, then the child inherits the parent’s signal mask.
POSIX_SPAWN_SETSIGDEF
Reset the disposition of all signals in the set specified in the spawn-sigdefault attribute of the object pointed to by attrp to the default. For the treatment of the dispositions of signals not specified in the spawn-sigdefault attribute, or the treatment when POSIX_SPAWN_SETSIGDEF is not specified, see execve(2).
POSIX_SPAWN_SETSCHEDPARAM
If this flag is set, and the POSIX_SPAWN_SETSCHEDULER flag is not set, then set the scheduling parameters to the parameters specified in the spawn-schedparam attribute of the object pointed to by attrp.
POSIX_SPAWN_SETSCHEDULER
Set the scheduling policy algorithm and parameters of the child, as follows:
The scheduling policy is set to the value specified in the spawn-schedpolicy attribute of the object pointed to by attrp.
The scheduling parameters are set to the value specified in the spawn-schedparam attribute of the object pointed to by attrp (but see BUGS).
If the POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDPOLICY flags are not specified, the child inherits the corresponding scheduling attributes from the parent.
POSIX_SPAWN_RESETIDS
If this flag is set, reset the effective UID and GID to the real UID and GID of the parent process. If this flag is not set, then the child retains the effective UID and GID of the parent. In either case, if the set-user-ID and set-group-ID permission bits are enabled on the executable file, their effect will override the setting of the effective UID and GID (se execve(2)).
POSIX_SPAWN_SETPGROUP
Set the process group to the value specified in the spawn-pgroup attribute of the object pointed to by attrp. If the spawn-pgroup attribute has the value 0, the child’s process group ID is made the same as its process ID. If the POSIX_SPAWN_SETPGROUP flag is not set, the child inherits the parent’s process group ID.
POSIX_SPAWN_USEVFORK
Since glibc 2.24, this flag has no effect. On older implementations, setting this flag forces the fork() step to use vfork(2) instead of fork(2). The _GNU_SOURCE feature test macro must be defined to obtain the definition of this constant.
POSIX_SPAWN_SETSID (since glibc 2.26)
If this flag is set, the child process shall create a new session and become the session leader. The child process shall also become the process group leader of the new process group in the session (see setsid(2)). The _GNU_SOURCE feature test macro must be defined to obtain the definition of this constant.
If attrp is NULL, then the default behaviors described above for each flag apply.
The file_actions argument specifies a sequence of file operations that are performed in the child process after the general processing described above, and before it performs the exec(3). If file_actions is NULL, then no special action is taken, and standard exec(3) semantics apply—file descriptors open before the exec remain open in the new process, except those for which the FD_CLOEXEC flag has been set. File locks remain in place.
If file_actions is not NULL, then it contains an ordered set of requests to open(2), close(2), and dup2(2) files. These requests are added to the file_actions by posix_spawn_file_actions_addopen(3), posix_spawn_file_actions_addclose(3), and posix_spawn_file_actions_adddup2(3). The requested operations are performed in the order they were added to file_actions.
If any of the housekeeping actions fails (due to bogus values being passed or other reasons why signal handling, process scheduling, process group ID functions, and file descriptor operations might fail), the child process exits with exit value 127.
exec() step
Once the child has successfully forked and performed all requested pre-exec steps, the child runs the requested executable.
The child process takes its environment from the envp argument, which is interpreted as if it had been passed to execve(2). The arguments to the created process come from the argv argument, which is processed as for execve(2).
RETURN VALUE
Upon successful completion, posix_spawn() and posix_spawnp() place the PID of the child process in pid, and return 0. If there is an error during the fork() step, then no child is created, the contents of *pid are unspecified, and these functions return an error number as described below.
Even when these functions return a success status, the child process may still fail for a plethora of reasons related to its pre-exec() initialization. In addition, the exec(3) may fail. In all of these cases, the child process will exit with the exit value of 127.
ERRORS
The posix_spawn() and posix_spawnp() functions fail only in the case where the underlying fork(2), vfork(2), or clone(2) call fails; in these cases, these functions return an error number, which will be one of the errors described for fork(2), vfork(2), or clone(2).
In addition, these functions fail if:
ENOSYS
Function not supported on this system.
STANDARDS
POSIX.1-2008.
HISTORY
glibc 2.2. POSIX.1-2001.
NOTES
The housekeeping activities in the child are controlled by the objects pointed to by attrp (for non-file actions) and file_actions In POSIX parlance, the posix_spawnattr_t and posix_spawn_file_actions_t data types are referred to as objects, and their elements are not specified by name. Portable programs should initialize these objects using only the POSIX-specified functions. (In other words, although these objects may be implemented as structures containing fields, portable programs must avoid dependence on such implementation details.)
According to POSIX, it is unspecified whether fork handlers established with pthread_atfork(3) are called when posix_spawn() is invoked. Since glibc 2.24, the fork handlers are not executed in any case. On older implementations, fork handlers are called only if the child is created using fork(2).
There is no “posix_fspawn” function (i.e., a function that is to posix_spawn() as fexecve(3) is to execve(2)). However, this functionality can be obtained by specifying the path argument as one of the files in the caller’s /proc/self/fd directory.
BUGS
POSIX.1 says that when POSIX_SPAWN_SETSCHEDULER is specified in spawn-flags, then the POSIX_SPAWN_SETSCHEDPARAM (if present) is ignored. However, before glibc 2.14, calls to posix_spawn() failed with an error if POSIX_SPAWN_SETSCHEDULER was specified without also specifying POSIX_SPAWN_SETSCHEDPARAM.
EXAMPLES
The program below demonstrates the use of various functions in the POSIX spawn API. The program accepts command-line attributes that can be used to create file actions and attributes objects. The remaining command-line arguments are used as the executable name and command-line arguments of the program that is executed in the child.
In the first run, the date(1) command is executed in the child, and the posix_spawn() call employs no file actions or attributes objects.
$ ./a.out date
PID of child: 7634
Tue Feb 1 19:47:50 CEST 2011
Child status: exited, status=0
In the next run, the -c command-line option is used to create a file actions object that closes standard output in the child. Consequently, date(1) fails when trying to perform output and exits with a status of 1.
$ ./a.out -c date
PID of child: 7636
date: write error: Bad file descriptor
Child status: exited, status=1
In the next run, the -s command-line option is used to create an attributes object that specifies that all (blockable) signals in the child should be blocked. Consequently, trying to kill child with the default signal sent by kill(1) (i.e., SIGTERM) fails, because that signal is blocked. Therefore, to kill the child, SIGKILL is necessary (SIGKILL can’t be blocked).
$ ./a.out -s sleep 60 &
[1] 7637
$ PID of child: 7638
$ kill 7638
$ kill -KILL 7638
$ Child status: killed by signal 9
[1]+ Done ./a.out -s sleep 60
When we try to execute a nonexistent command in the child, the exec(3) fails and the child exits with a status of 127.
$ ./a.out xxxxx
PID of child: 10190
Child status: exited, status=127
Program source
#include <errno.h>
#include <spawn.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <wait.h>
#define errExit(msg) do { perror(msg); \
exit(EXIT_FAILURE); } while (0)
#define errExitEN(en, msg) \
do { errno = en; perror(msg); \
exit(EXIT_FAILURE); } while (0)
char **environ;
int
main(int argc, char *argv[])
{
pid_t child_pid;
int s, opt, status;
sigset_t mask;
posix_spawnattr_t attr;
posix_spawnattr_t *attrp;
posix_spawn_file_actions_t file_actions;
posix_spawn_file_actions_t *file_actionsp;
/* Parse command-line options, which can be used to specify an
attributes object and file actions object for the child. */
attrp = NULL;
file_actionsp = NULL;
while ((opt = getopt(argc, argv, "sc")) != -1) {
switch (opt) {
case 'c': /* -c: close standard output in child */
/* Create a file actions object and add a "close"
action to it. */
s = posix_spawn_file_actions_init(&file_actions);
if (s != 0)
errExitEN(s, "posix_spawn_file_actions_init");
s = posix_spawn_file_actions_addclose(&file_actions,
STDOUT_FILENO);
if (s != 0)
errExitEN(s, "posix_spawn_file_actions_addclose");
file_actionsp = &file_actions;
break;
case 's': /* -s: block all signals in child */
/* Create an attributes object and add a "set signal mask"
action to it. */
s = posix_spawnattr_init(&attr);
if (s != 0)
errExitEN(s, "posix_spawnattr_init");
s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);
if (s != 0)
errExitEN(s, "posix_spawnattr_setflags");
sigfillset(&mask);
s = posix_spawnattr_setsigmask(&attr, &mask);
if (s != 0)
errExitEN(s, "posix_spawnattr_setsigmask");
attrp = &attr;
break;
}
}
/* Spawn the child. The name of the program to execute and the
command-line arguments are taken from the command-line arguments
of this program. The environment of the program execed in the
child is made the same as the parent's environment. */
s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,
&argv[optind], environ);
if (s != 0)
errExitEN(s, "posix_spawn");
/* Destroy any objects that we created earlier. */
if (attrp != NULL) {
s = posix_spawnattr_destroy(attrp);
if (s != 0)
errExitEN(s, "posix_spawnattr_destroy");
}
if (file_actionsp != NULL) {
s = posix_spawn_file_actions_destroy(file_actionsp);
if (s != 0)
errExitEN(s, "posix_spawn_file_actions_destroy");
}
printf("PID of child: %jd
“, (intmax_t) child_pid); /* Monitor status of the child until it terminates. */ do { s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED); if (s == -1) errExit(“waitpid”); printf(“Child status: “); if (WIFEXITED(status)) { printf(“exited, status=%d “, WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { printf(“killed by signal %d “, WTERMSIG(status)); } else if (WIFSTOPPED(status)) { printf(“stopped by signal %d “, WSTOPSIG(status)); } else if (WIFCONTINUED(status)) { printf(“continued “); } } while (!WIFEXITED(status) && !WIFSIGNALED(status)); exit(EXIT_SUCCESS); }
SEE ALSO
close(2), dup2(2), execl(2), execlp(2), fork(2), open(2), sched_setparam(2), sched_setscheduler(2), setpgid(2), setuid(2), sigaction(2), sigprocmask(2), posix_spawn_file_actions_addclose(3), posix_spawn_file_actions_adddup2(3), posix_spawn_file_actions_addopen(3), posix_spawn_file_actions_destroy(3), posix_spawn_file_actions_init(3), posix_spawnattr_destroy(3), posix_spawnattr_getflags(3), posix_spawnattr_getpgroup(3), posix_spawnattr_getschedparam(3), posix_spawnattr_getschedpolicy(3), posix_spawnattr_getsigdefault(3), posix_spawnattr_getsigmask(3), posix_spawnattr_init(3), posix_spawnattr_setflags(3), posix_spawnattr_setpgroup(3), posix_spawnattr_setschedparam(3), posix_spawnattr_setschedpolicy(3), posix_spawnattr_setsigdefault(3), posix_spawnattr_setsigmask(3), pthread_atfork(3), <spawn.h>, Base Definitions volume of POSIX.1-2001, http://www.opengroup.org/unix/online.html
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
65 - Linux cli command XtRegisterDrawable
NAME 🖥️ XtRegisterDrawable 🖥️
register a drawable with the Intrinsics event dispatcher
SYNTAX
#include <X11/Intrinsic.h>
void XtRegisterDrawable(Display* display, Drawable drawable, Widget widget);
void XtUnregisterDrawable(Display* display, Drawable drawable);
ARGUMENTS
display
Specifies the drawable’s display.
drawable
Specifies the drawable to register.
widget
Specifies the widget to register the drawable for.
DESCRIPTION
XtRegisterDrawable associates the specified drawable with the specified widget so that future calls to XtWindowToWidget with the drawable will return the widget. The default event dispatcher will dispatch future core events that arrive with the drawable to the widget as though the event contained the widget’s window, but the event itself will not be changed in any way when being passed to even handler or action procedures.
If the drawable is already registered with another widget, or if the drawable is the window of a widget in the client’s widget tree, the results of calling XtRegisterDrawable are undefined.
XtUnregisterDrawable removes an association created with XtRegisterDrawable. If the drawable is the window of a widget in the client’s widget tree the results of calling XtUnregisterDrawable are undefined.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
66 - Linux cli command XtSetValues
NAME 🖥️ XtSetValues 🖥️
obtain and set widget resources
SYNTAX
#include <X11/Intrinsic.h>
void XtSetValues(Widget w, ArgList args, Cardinal num_args);
void XtVaSetValues(Widget w, … );
void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);
void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );
void XtGetValues(Widget w, ArgList args, Cardinal num_args);
void XtVaGetValues(Widget w, … );
void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);
void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );
ARGUMENTS
args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.
base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.
num_args
Specifies the number of arguments in the argument list.
resources
Specifies the nonwidget resource list or values.
num_resources
Specifies the number of resources in the resource list.
- Specifies the widget.
…
Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.
DESCRIPTION
The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.
If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.
XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.
Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.
The XtSetSubvalues function stores resources into the structure identified by base.
The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.
If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.
The XtGetSubvalues function obtains resource values from the structure identified by base.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
67 - Linux cli command significand
NAME 🖥️ significand 🖥️
get mantissa of floating-point number
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double significand(double x);
float significandf(float x);
long double significandl(long double x);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
significand(), significandf(), significandl():
/* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These functions return the mantissa of x scaled to the range [1, FLT_RADIX). They are equivalent to
scalb(x, (double) -ilogb(x))
This function exists mainly for use in certain standardized tests for IEEE 754 conformance.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
significand(), significandf(), significandl() | Thread safety | MT-Safe |
STANDARDS
None.
significand()
BSD.
HISTORY
significand()
BSD.
SEE ALSO
ilogb(3), scalb(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
68 - Linux cli command getutline
NAME 🖥️ getutline 🖥️
access utmp file entries
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);
DESCRIPTION
New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.
utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.
setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.
endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.
getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).
getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.
getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.
pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.
RETURN VALUE
getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.
On success pututline() returns ut; on failure, it returns NULL.
utmpname() returns 0 if the new name was successfully stored, or -1 on failure.
On failure, these functions errno set to indicate the error.
ERRORS
ENOMEM
Out of memory.
ESRCH
Record not found.
setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).
FILES
/var/run/utmp
database of currently logged-in users
/var/log/wtmp
database of past user logins
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
getutent() | Thread safety | MT-Unsafe init race:utent race:utentbuf sig:ALRM timer |
getutid(), getutline() | Thread safety | MT-Unsafe init race:utent sig:ALRM timer |
pututline() | Thread safety | MT-Unsafe race:utent sig:ALRM timer |
setutent(), endutent(), utmpname() | Thread safety | MT-Unsafe race:utent |
In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.
STANDARDS
None.
HISTORY
XPG2, SVr4.
In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().
All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses
#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);
These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.
On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.
Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).
NOTES
glibc notes
The above functions are not thread-safe. glibc adds reentrant versions
#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
struct utmp *ubuf, struct utmp **ubufp);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getutent_r(), getutid_r(), getutline_r():
_GNU_SOURCE
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)
EXAMPLES
The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).
#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
struct utmp entry;
system("echo before adding entry:;who");
entry.ut_type = USER_PROCESS;
entry.ut_pid = getpid();
strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
/* only correct for ptys named /dev/tty[pqr][0-9a-z] */
strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
entry.ut_time = time(NULL);
strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
memset(entry.ut_host, 0, UT_HOSTSIZE);
entry.ut_addr = 0;
setutent();
pututline(&entry);
system("echo after adding entry:;who");
entry.ut_type = DEAD_PROCESS;
memset(entry.ut_line, 0, UT_LINESIZE);
entry.ut_time = 0;
memset(entry.ut_user, 0, UT_NAMESIZE);
setutent();
pututline(&entry);
system("echo after removing entry:;who");
endutent();
exit(EXIT_SUCCESS);
}
SEE ALSO
getutmp(3), utmp(5)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
69 - Linux cli command XShm
NAME 🖥️ XShm 🖥️
X Shared Memory extension functions
SYNTAX
#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool XShmQueryExtension(
Display *display);
Bool XShmQueryVersion(
Display *display;
int *major, *minor;
Bool *pixmaps);
int XShmPixmapFormat(
Display *display);
Bool XShmAttach(
Display *display;
XShmSegmentInfo *shminfo);
Bool XShmDetach(
Display *display;
XShmSegmentInfo *shminfo);
XImage *XShmCreateImage (
Display *display;
Visual *visual;
unsigned int depth;
int format;
char *data;
XShmSegmentInfo *shminfo;
unsigned int width, height);
Bool XShmPutImage(
Display *display;
Drawable d;
GC gc;
XImage *image;
int src_x, src_y, dest_x, dest_y;
unsigned int width, height;
bool send_event);
Bool XShmGetImage (
Display *display;
Drawable d;
XImage *image;
int x, y;
unsigned long plane_mask);
Pixmap XShmCreatePixmap(
Display *display;
Drawable d;
char *data;
XShmSegmentInfo *shminfo;
unsigned int width, height, depth);
Status XShmGetEventBase(
Display *display);
STRUCTURES
Events:
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by server*/
Bool send_event; /* true if this came from a SendEvent request*/
Display *display; /* Display the event was read from */
Drawable drawable; /* drawable of request */
int major_code; /* ShmReqCode */
int minor_code; /* X_ShmPutImage */
ShmSeg shmseg; /* the ShmSeg used in the request*/
unsigned long offset; /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :
typedef struct {
ShmSeg shmseg; /* resource id */
int shmid; /* kernel id */
char *shmaddr; /* address in client */
Bool readOnly; /* how the server should attach it */
} XShmSegmentInfo;
DESCRIPTION
* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.
* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.
* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.
* XShmDetach * tells the server to detach from your shared memory segment.
* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.
* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.
* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.
* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.
* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.
* XShmGetEventBase * gets the completion event value.
SEE ALSO
MIT-SHM - The MIT Shared Memory Extension
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
70 - Linux cli command regfree
NAME 🖥️ regfree 🖥️
POSIX regex functions
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
char errbuf[_Nullable restrict .errbuf_size],
size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
size_t re_nsub;
} regex_t;
typedef struct {
regoff_t rm_so;
regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;
DESCRIPTION
Compilation
regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.
On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().
After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.
cflags is the bitwise OR of zero or more of the following:
REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.
REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.
REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.
REG_NEWLINE
Match-any-character operators don’t match a newline.
A nonmatching list ([^…]) not containing a newline does not match a newline.
Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.
Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.
Matching
regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:
REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.
REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).
REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.
Match offsets
Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.
Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).
regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.
Error reporting
regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.
If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.
If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.
Freeing
regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().
RETURN VALUE
regcomp() returns zero for a successful compilation or an error code for failure.
regexec() returns zero for a successful match or REG_NOMATCH for failure.
regerror() returns the size of the buffer required to hold the string.
ERRORS
The following errors can be returned by regcomp():
REG_BADBR
Invalid use of back reference operator.
REG_BADPAT
Invalid use of pattern operators such as group or list.
REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.
REG_EBRACE
Un-matched brace interval operators.
REG_EBRACK
Un-matched bracket list operators.
REG_ECOLLATE
Invalid collating element.
REG_ECTYPE
Unknown character class name.
REG_EEND
Nonspecific error. This is not defined by POSIX.
REG_EESCAPE
Trailing backslash.
REG_EPAREN
Un-matched parenthesis group operators.
REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.
REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.
REG_ESPACE
The regex routines ran out of memory.
REG_ESUBREG
Invalid back reference to a subexpression.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
regcomp(), regexec() | Thread safety | MT-Safe locale |
regerror() | Thread safety | MT-Safe env |
regfree() | Thread safety | MT-Safe |
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001.
Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.
CAVEATS
re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.
Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.
EXAMPLES
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
"1) John Driverhacker;
- John Doe;
- John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(®ex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(®ex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }
SEE ALSO
grep(1), regex(7)
The glibc manual section, Regular Expressions
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
71 - Linux cli command STAILQ_INSERT_HEAD
NAME 🖥️ STAILQ_INSERT_HEAD 🖥️
implementation of a singly linked tail queue
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);
Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.
DESCRIPTION
These macros define and operate on singly linked tail queues.
In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().
Creation
A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:
STAILQ_HEAD(HEADNAME, TYPE) head;
where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:
struct HEADNAME *headp;
(The names head and headp are user selectable.)
STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.
STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.
STAILQ_INIT() initializes the tail queue referenced by head.
STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.
Insertion
STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.
STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.
STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.
Traversal
STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.
STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.
STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.
Removal
STAILQ_REMOVE() removes the element elm from the tail queue.
STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.
Other features
STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.
RETURN VALUE
STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.
STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.
STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.
VERSIONS
Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().
BUGS
STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.
STANDARDS
BSD.
HISTORY
4.4BSD.
EXAMPLES
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
int data;
STAILQ_ENTRY(entry) entries; /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct stailhead head; /* Singly linked tail queue
head */
STAILQ_INIT(&head); /* Initialize the queue */
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
STAILQ_INSERT_HEAD(&head, n1, entries);
n1 = malloc(sizeof(struct entry)); /* Insert at the tail */
STAILQ_INSERT_TAIL(&head, n1, entries);
n2 = malloc(sizeof(struct entry)); /* Insert after */
STAILQ_INSERT_AFTER(&head, n1, n2, entries);
STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
free(n2);
n3 = STAILQ_FIRST(&head);
STAILQ_REMOVE_HEAD(&head, entries); /* Deletion from the head */
free(n3);
n1 = STAILQ_FIRST(&head);
n1->data = 0;
for (unsigned int i = 1; i < 5; i++) {
n1 = malloc(sizeof(struct entry));
STAILQ_INSERT_HEAD(&head, n1, entries);
n1->data = i;
}
/* Forward traversal */
STAILQ_FOREACH(np, &head, entries)
printf("%i
“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }
SEE ALSO
insque(3), queue(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
72 - Linux cli command Tk_LabFramepm
NAME 🖥️ Tk_LabFramepm 🖥️
labeled frame.
SYNOPSIS
use Tk::LabFrame;
$f
= $parent
->LabFrame(?-label=>text, -labelside=>where, …?);
DESCRIPTION
LabFrame is exactly like Frame and additionally allows one to add a label to the frame.
WIDGET-OPTIONS
LabFrame supports the same options as the Frame widget.
Additional options of LabFrame are:
-font => font
Specifies the label’s font
-foreground => color
Specifies the label’s foreground color
-label => text
The text of the label to be placed with the Frame.
-labelside => where
Where can be one of left, right, top, bottom or acrosstop. The first four work as might be expected and place the label to the left, right, above or below the frame respectively. The acrosstop creates a grooved frame around the central frame and puts the label near the northwest corner such that it appears to “overwrite” the groove.
-labelvariable => scalar_ref
Specifies a reference to a variable and used as an alternative to -label. If the value of the variable changes, then the widget will be updated automatically to reflect the change. Used like -textvariable.
ADVERTISED SUBWIDGETS
See “Subwidget” in Tk::mega how to use advertised widgets.
border
Frame used to display the border
frame
Frame used to create new LabFrame children.
label
Label used for displaying text
EXAMPLE
Run the following test program to see this in action:
use strict; use Tk; require Tk::LabFrame; require Tk::LabEntry; my $test = Test this; my $mw = Tk::MainWindow->new; my $f = $mw->LabFrame(-label => “This is a label”, -labelside => “acrosstop”); $f->LabEntry(-label => “Testing”, -textvariable => \test)->pack; $f->pack; Tk::MainLoop;
BUGS
Perhaps LabFrame should be subsumed within the generic pTk labeled widget mechanism.
AUTHOR
Rajappa Iyer [email protected]
This code is derived from LabFrame.tcl and LabWidg.tcl in the Tix4.0 distribution by Ioi Lam. The code may be redistributed under the same terms as Perl.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
73 - Linux cli command XtOffset
NAME 🖥️ XtOffset 🖥️
determine the byte offset or number of array elements
SYNTAX
#include <X11/Intrinsic.h>
Cardinal XtOffset(Type pointer_type, Field field_name);
Cardinal XtOffsetOf(Type structure_type, Field field_name);
Cardinal XtNumber(ArrayVariable array);
ARGUMENTS
array
Specifies a fixed-size array.
field_name
Specifies the name of the field for which to calculate the byte offset.
pointer_type
Specifies a type that is declared as a pointer to the structure.
structure_type
Specifies a type that is declared as a structure.
DESCRIPTION
The XtOffset macro is usually used to determine the offset of various resource fields from the beginning of a widget and can be used at compile time in static initializations.
The XtOffsetOf macro expands to a constant expression that gives the offset in bytes to the specified structure member from the beginning of the structure. It is normally used to statically initialize resource lists and is more portable than XtOffset, which serves the same function.
The XtNumber macro returns the number of elements in the specified argument lists, resources lists, and other counted arrays.
SEE ALSO
XtGetResourceList(3), XtSetArg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
74 - Linux cli command TAILQ_HEAD
NAME 🖥️ TAILQ_HEAD 🖥️
implementation of a doubly linked tail queue
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
TAILQ_ENTRY NAME);
DESCRIPTION
These macros define and operate on doubly linked tail queues.
In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().
Creation
A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:
TAILQ_HEAD(HEADNAME, TYPE) head;
where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:
struct HEADNAME *headp;
(The names head and headp are user selectable.)
TAILQ_ENTRY() declares a structure that connects the elements in the queue.
TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.
TAILQ_INIT() initializes the queue referenced by
TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.
Insertion
TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.
TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.
TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.
TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.
Traversal
TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.
TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.
TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.
TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.
TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.
TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.
Removal
TAILQ_REMOVE() removes the element elm from the queue.
Other features
TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.
RETURN VALUE
TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.
TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.
TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.
STANDARDS
BSD.
HISTORY
4.4BSD.
CAVEATS
TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.
EXAMPLES
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
int data;
TAILQ_ENTRY(entry) entries; /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct tailhead head; /* Tail queue head */
int i;
TAILQ_INIT(&head); /* Initialize the queue */
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
TAILQ_INSERT_HEAD(&head, n1, entries);
n1 = malloc(sizeof(struct entry)); /* Insert at the tail */
TAILQ_INSERT_TAIL(&head, n1, entries);
n2 = malloc(sizeof(struct entry)); /* Insert after */
TAILQ_INSERT_AFTER(&head, n1, n2, entries);
n3 = malloc(sizeof(struct entry)); /* Insert before */
TAILQ_INSERT_BEFORE(n2, n3, entries);
TAILQ_REMOVE(&head, n2, entries); /* Deletion */
free(n2);
/* Forward traversal */
i = 0;
TAILQ_FOREACH(np, &head, entries)
np->data = i++;
/* Reverse traversal */
TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
printf("%i
“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }
SEE ALSO
insque(3), queue(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
75 - Linux cli command Tk_Popuppm
NAME 🖥️ Tk_Popuppm 🖥️
popup dialog windows.
SYNOPSIS
$dialog->Popup(qw/ -popover => cursor | $widget | undef, -overanchor => c | n | ne | e | se | s | sw | w | nw, -popanchor => c | n | ne | e | se | s | sw | w | nw, /);
DESCRIPTION
You’ve probably had occasion to use a Dialog (or DialogBox) widget. These widgets are derived from a Toplevel (which is a subclass of Tk::Wm, the window manager) and spend most of their time in a withdrawn state. It’s also common to use Toplevels as containers for custom built popup windows. Menus, too, are dialogs derived from the window manager class. For this discussion, we’ll use the simple term dialog to refer any widget that pops up and awaits user interaction, whether it be a Menu, a special purpose Toplevel, or any of the dialog-type widgets, including, but not limited to, ColorEditor, Dialog, DialogBox, ErrorDialog, FileSelect, FBox, getOpenFile and getSaveFile.
When it’s time to display these dialogs, we call the Perl/Tk window manager Popup method. Popup accepts three special purpose options that specify placement information in high-level terms rather than numerical coordinates. It is Popup’s responsibility to take our human specifications and turn them into actual screen coordinates before displaying the dialog.
We can direct the dialog to appear in two general locations, either over another window (e.g. the root window (screen) or a particular widget), or over the cursor. This is called the popover location. Once we’ve made this decision we can further refine the exact placement of the dialog relative to the popover location by specifying the intersection of two anchor points. The popanchor point is associated with the dialog and the overanchor point is associated with the popover location (whether it be a window or the cursor). The point where the two anchor points coincide is the popup locus. Anchor points are string values and can be c (for center), or any of the eight cardinal compass points: n, ne, e, se, s, sw, w or nw.
For example, if -popover specifies a widget, -popanchor is sw, and -overanchor is ne, the the dialog’s southwest corner pops up at the widget’s northeast corner.
OPTIONS
The options recognized by Popup are as follows:
-popover
Specifies whether the dialog “pops over” a window or the cursor. It may be the string cursor, a widget reference, or undef for the root window.
-popanchor
Specifies the anchor point of the dialog. For instance, if e is specified, the right side of the dialog is the anchor.
-overanchor
Specifies where the dialog should anchor relative to the popover location. For instance, if e is specified the dialog appears over the right side of the popover location and if it’s ne the the dialog is positioned at the upper-right corner of the popover location.
AUTHOR
Nick Ing-Simmons, Steve Lidie
This code is distributed under the same terms as Perl.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
76 - Linux cli command XtSetWMColormapWindows
NAME 🖥️ XtSetWMColormapWindows 🖥️
Set the value of the WM_COLORMAP_WINDOWS property
SYNTAX
#include <X11/Intrinsic.h>
void XtSetWMColormapWindows(Widget widget, Widget* list, Cardinal count);
ARGUMENTS
widget
Specifies the widget on whose window the WM_COLORMAP_WINDOWS property will be stored. Must be of class Core or any subclass thereof.
list
Specifies a list of widgets whose windows are are potentially to be listed in the WM_COLORMAP_WINDOWS property.
count
Specifies the number of widgets in list.
DESCRIPTION
XtSetWMColormapWindows returns immediately if widget is not realized or if count is zero. Otherwise, XtSetWMColormapWindows constructs an ordered list of windows by examining each widget in list in turn and ignoring the widget if it is not realized, or adding the widget’s window to the window list if the widget is realized and its colormap resource is different from the colormap resources of all widgets whose windows are already on the window list.
Finally, XtSetWMColormapWindows stores the resulting window list in the WM_COLORMAP_WINDOWS property on the specified widget’s window.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
77 - Linux cli command Moose_Meta_Classpm
NAME 🖥️ Moose_Meta_Classpm 🖥️
The Moose metaclass
VERSION
version 2.2207
DESCRIPTION
This class is a subclass of Class::MOP::Class that provides additional Moose-specific functionality.
To really understand this class, you will need to start with the Class::MOP::Class documentation. This class can be understood as a set of additional features on top of the basic feature provided by that parent class.
INHERITANCE
Moose::Meta::Class
is a subclass of Class::MOP::Class.
METHODS
Moose::Meta::Class->initialize($package_name, %options)
This overrides the parent’s method in order to provide its own defaults for the attribute_metaclass
, instance_metaclass
, and method_metaclass
options. These all default to the appropriate Moose class.
Moose::Meta::Class->create($package_name, %options)
This overrides the parent’s method in order to accept a roles
option. This should be an array reference containing roles that the class does, each optionally followed by a hashref of options (-excludes
and -alias
). my $metaclass = Moose::Meta::Class->create( New::Class, roles => […] );
Moose::Meta::Class->create_anon_class
This overrides the parent’s method to accept a roles
option, just as create
does. It also accepts a cache
option. If this is true
, then the anonymous class will be cached based on its superclasses and roles. If an existing anonymous class in the cache has the same superclasses and roles, it will be reused. my $metaclass = Moose::Meta::Class->create_anon_class( superclasses => [Foo], roles => [qw/Some Roles Go Here/], cache => 1, ); Each entry in both the superclasses
and the roles
option can be followed by a hash reference with arguments. The superclasses
option can be supplied with a -version option that ensures the loaded superclass satisfies the required version. The role
option also takes the -version
as an argument, but the option hash reference can also contain any other role relevant values like exclusions or parameterized role arguments.
$metaclass->new_object(%params)
This overrides the parent’s method in order to add support for attribute triggers.
$metaclass->superclasses(@superclasses)
This is the accessor allowing you to read or change the parents of the class. Each superclass can be followed by a hash reference containing a -version value. If the version requirement is not satisfied an error will be thrown. When you pass classes to this method, we will attempt to load them if they are not already loaded.
$metaclass->add_override_method_modifier($name, $sub)
This adds an override
method modifier to the package.
$metaclass->add_augment_method_modifier($name, $sub)
This adds an augment
method modifier to the package.
$metaclass->calculate_all_roles
This will return a unique array of Moose::Meta::Role instances which are attached to this class.
$metaclass->calculate_all_roles_with_inheritance
This will return a unique array of Moose::Meta::Role instances which are attached to this class, and each of this class’s ancestors.
$metaclass->add_role($role)
This takes a Moose::Meta::Role object, and adds it to the class’s list of roles. This does not actually apply the role to the class.
$metaclass->role_applications
Returns a list of Moose::Meta::Role::Application::ToClass objects, which contain the arguments to role application.
$metaclass->add_role_application($application)
This takes a Moose::Meta::Role::Application::ToClass object, and adds it to the class’s list of role applications. This does not actually apply any role to the class; it is only for tracking role applications.
$metaclass->does_role($role)
This returns a boolean indicating whether or not the class does the specified role. The role provided can be either a role name or a Moose::Meta::Role object. This tests both the class and its parents.
$metaclass->excludes_role($role_name)
A class excludes a role if it has already composed a role which excludes the named role. This tests both the class and its parents.
$metaclass->add_attribute($attr_name, %params|$params)
This overrides the parent’s method in order to allow the parameters to be provided as a hash reference.
$metaclass->constructor_class($class_name)
$metaclass->destructor_class($class_name)
These are the names of classes used when making a class immutable. These default to Moose::Meta::Method::Constructor and Moose::Meta::Method::Destructor respectively. These accessors are read-write, so you can use them to change the class name.
BUGS
See “BUGS” in Moose for details on reporting bugs.
AUTHORS
Stevan Little <[email protected]>
Dave Rolsky <[email protected]>
Jesse Luehrs <[email protected]>
Shawn M Moore <[email protected]>
יובל קוג’מן (Yuval Kogman) <[email protected]>
Karen Etheridge <[email protected]>
Florian Ragwitz <[email protected]>
Hans Dieter Pearcey <[email protected]>
Chris Prather <[email protected]>
Matt S Trout <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
78 - Linux cli command realloc
NAME 🖥️ realloc 🖥️
allocate and free dynamic memory
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
void *malloc(size_t size);
void free(void *_Nullable ptr);
void *calloc(size_t nmemb, size_t size);
void *realloc(void *_Nullable ptr, size_t size);
void *reallocarray(void *_Nullable ptr, size_t nmemb, size_t size);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
reallocarray():
Since glibc 2.29:
_DEFAULT_SOURCE
glibc 2.28 and earlier:
_GNU_SOURCE
DESCRIPTION
malloc()
The malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc() returns a unique pointer value that can later be successfully passed to free(). (See “Nonportable behavior” for portability issues.)
free()
The free() function frees the memory space pointed to by ptr, which must have been returned by a previous call to malloc() or related functions. Otherwise, or if ptr has already been freed, undefined behavior occurs. If ptr is NULL, no operation is performed.
calloc()
The calloc() function allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the allocated memory. The memory is set to zero. If nmemb or size is 0, then calloc() returns a unique pointer value that can later be successfully passed to free().
If the multiplication of nmemb and size would result in integer overflow, then calloc() returns an error. By contrast, an integer overflow would not be detected in the following call to malloc(), with the result that an incorrectly sized block of memory would be allocated:
malloc(nmemb * size);
realloc()
The realloc() function changes the size of the memory block pointed to by ptr to size bytes. The contents of the memory will be unchanged in the range from the start of the region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized.
If ptr is NULL, then the call is equivalent to malloc(size), for all values of size.
If size is equal to zero, and ptr is not NULL, then the call is equivalent to free(ptr) (but see “Nonportable behavior” for portability issues).
Unless ptr is NULL, it must have been returned by an earlier call to malloc or related functions. If the area pointed to was moved, a free(ptr) is done.
reallocarray()
The reallocarray() function changes the size of (and possibly moves) the memory block pointed to by ptr to be large enough for an array of nmemb elements, each of which is size bytes. It is equivalent to the call
realloc(ptr, nmemb * size);
However, unlike that realloc() call, reallocarray() fails safely in the case where the multiplication would overflow. If such an overflow occurs, reallocarray() returns an error.
RETURN VALUE
The malloc(), calloc(), realloc(), and reallocarray() functions return a pointer to the allocated memory, which is suitably aligned for any type that fits into the requested size or less. On error, these functions return NULL and set errno. Attempting to allocate more than PTRDIFF_MAX bytes is considered an error, as an object that large could cause later pointer subtraction to overflow.
The free() function returns no value, and preserves errno.
The realloc() and reallocarray() functions return NULL if ptr is not NULL and the requested size is zero; this is not considered an error. (See “Nonportable behavior” for portability issues.) Otherwise, the returned pointer may be the same as ptr if the allocation was not moved (e.g., there was room to expand the allocation in-place), or different from ptr if the allocation was moved to a new address. If these functions fail, the original block is left untouched; it is not freed or moved.
ERRORS
calloc(), malloc(), realloc(), and reallocarray() can fail with the following error:
ENOMEM
Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in getrlimit(2). Another reason could be that the number of mappings created by the caller process exceeded the limit specified by /proc/sys/vm/max_map_count.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
malloc(), free(), calloc(), realloc() | Thread safety | MT-Safe |
STANDARDS
malloc()
free()
calloc()
realloc()
C11, POSIX.1-2008.
reallocarray()
None.
HISTORY
malloc()
free()
calloc()
realloc()
POSIX.1-2001, C89.
reallocarray()
glibc 2.26. OpenBSD 5.6, FreeBSD 11.0.
malloc() and related functions rejected sizes greater than PTRDIFF_MAX starting in glibc 2.30.
free() preserved errno starting in glibc 2.33.
NOTES
By default, Linux follows an optimistic memory allocation strategy. This means that when malloc() returns non-NULL there is no guarantee that the memory really is available. In case it turns out that the system is out of memory, one or more processes will be killed by the OOM killer. For more information, see the description of /proc/sys/vm/overcommit_memory and /proc/sys/vm/oom_adj in proc(5), and the Linux kernel source file Documentation/vm/overcommit-accounting.rst.
Normally, malloc() allocates memory from the heap, and adjusts the size of the heap as required, using sbrk(2). When allocating blocks of memory larger than MMAP_THRESHOLD bytes, the glibc malloc() implementation allocates the memory as a private anonymous mapping using mmap(2). MMAP_THRESHOLD is 128 kB by default, but is adjustable using mallopt(3). Prior to Linux 4.7 allocations performed using mmap(2) were unaffected by the RLIMIT_DATA resource limit; since Linux 4.7, this limit is also enforced for allocations performed using mmap(2).
To avoid corruption in multithreaded applications, mutexes are used internally to protect the memory-management data structures employed by these functions. In a multithreaded application in which threads simultaneously allocate and free memory, there could be contention for these mutexes. To scalably handle memory allocation in multithreaded applications, glibc creates additional memory allocation arenas if mutex contention is detected. Each arena is a large region of memory that is internally allocated by the system (using brk(2) or mmap(2)), and managed with its own mutexes.
If your program uses a private memory allocator, it should do so by replacing malloc(), free(), calloc(), and realloc(). The replacement functions must implement the documented glibc behaviors, including errno handling, size-zero allocations, and overflow checking; otherwise, other library routines may crash or operate incorrectly. For example, if the replacement free() does not preserve errno, then seemingly unrelated library routines may fail without having a valid reason in errno. Private memory allocators may also need to replace other glibc functions; see “Replacing malloc” in the glibc manual for details.
Crashes in memory allocators are almost always related to heap corruption, such as overflowing an allocated chunk or freeing the same pointer twice.
The malloc() implementation is tunable via environment variables; see mallopt(3) for details.
Nonportable behavior
The behavior of these functions when the requested size is zero is glibc specific; other implementations may return NULL without setting errno, and portable POSIX programs should tolerate such behavior. See realloc(3p).
POSIX requires memory allocators to set errno upon failure. However, the C standard does not require this, and applications portable to non-POSIX platforms should not assume this.
Portable programs should not use private memory allocators, as POSIX and the C standard do not allow replacement of malloc(), free(), calloc(), and realloc().
EXAMPLES
#include <err.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))
#define MALLOC(type) MALLOCARRAY(1, type)
static inline void *my_mallocarray(size_t nmemb, size_t size);
int
main(void)
{
char *p;
p = MALLOCARRAY(32, char);
if (p == NULL)
err(EXIT_FAILURE, "malloc");
strlcpy(p, "foo", 32);
puts(p);
}
static inline void *
my_mallocarray(size_t nmemb, size_t size)
{
return reallocarray(NULL, nmemb, size);
}
SEE ALSO
valgrind(1), brk(2), mmap(2), alloca(3), malloc_get_state(3), malloc_info(3), malloc_trim(3), malloc_usable_size(3), mallopt(3), mcheck(3), mtrace(3), posix_memalign(3)
For details of the GNU C library implementation, see .
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
79 - Linux cli command setutxent
NAME 🖥️ setutxent 🖥️
access utmp file entries
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);
DESCRIPTION
New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.
utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.
setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.
endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.
getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).
getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.
getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.
pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.
RETURN VALUE
getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.
On success pututline() returns ut; on failure, it returns NULL.
utmpname() returns 0 if the new name was successfully stored, or -1 on failure.
On failure, these functions errno set to indicate the error.
ERRORS
ENOMEM
Out of memory.
ESRCH
Record not found.
setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).
FILES
/var/run/utmp
database of currently logged-in users
/var/log/wtmp
database of past user logins
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
getutent() | Thread safety | MT-Unsafe init race:utent race:utentbuf sig:ALRM timer |
getutid(), getutline() | Thread safety | MT-Unsafe init race:utent sig:ALRM timer |
pututline() | Thread safety | MT-Unsafe race:utent sig:ALRM timer |
setutent(), endutent(), utmpname() | Thread safety | MT-Unsafe race:utent |
In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.
STANDARDS
None.
HISTORY
XPG2, SVr4.
In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().
All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses
#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);
These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.
On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.
Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).
NOTES
glibc notes
The above functions are not thread-safe. glibc adds reentrant versions
#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
struct utmp *ubuf, struct utmp **ubufp);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getutent_r(), getutid_r(), getutline_r():
_GNU_SOURCE
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)
EXAMPLES
The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).
#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
struct utmp entry;
system("echo before adding entry:;who");
entry.ut_type = USER_PROCESS;
entry.ut_pid = getpid();
strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
/* only correct for ptys named /dev/tty[pqr][0-9a-z] */
strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
entry.ut_time = time(NULL);
strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
memset(entry.ut_host, 0, UT_HOSTSIZE);
entry.ut_addr = 0;
setutent();
pututline(&entry);
system("echo after adding entry:;who");
entry.ut_type = DEAD_PROCESS;
memset(entry.ut_line, 0, UT_LINESIZE);
entry.ut_time = 0;
memset(entry.ut_user, 0, UT_NAMESIZE);
setutent();
pututline(&entry);
system("echo after removing entry:;who");
endutent();
exit(EXIT_SUCCESS);
}
SEE ALSO
getutmp(3), utmp(5)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
80 - Linux cli command HTML_FormatMarkdownpm
NAME 🖥️ HTML_FormatMarkdownpm 🖥️
Format HTML as Markdown
VERSION
version 2.16
SYNOPSIS
use HTML::FormatMarkdown; my $string = HTML::FormatMarkdown->format_file( test.html ); open my $fh, “>”, “test.md” or die “$! “; print $fh $string; close $fh;
DESCRIPTION
HTML::FormatMarkdown is a formatter that outputs Markdown.
HTML::FormatMarkdown is built on HTML::Formatter and documentation for that module applies to this - especially new in HTML::Formatter, format_file in HTML::Formatter and format_string in HTML::Formatter.
AUTHORS
Nigel Metheringham <[email protected]>
Sean M Burke <[email protected]>
Gisle Aas <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
81 - Linux cli command strtoull
NAME 🖥️ strtoull 🖥️
convert a string to an unsigned long integer
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
unsigned long strtoul(const char *restrict nptr,
char **restrict endptr, int base);
unsigned long long strtoull(const char *restrict nptr,
char **restrict endptr, int base);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
strtoull():
_ISOC99_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
DESCRIPTION
The strtoul() function converts the initial part of the string in nptr to an unsigned long value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.
The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional ‘+’ or ‘-’ sign. If base is zero or 16, the string may then include a “0x” prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is ‘0’, in which case it is taken as 8 (octal).
The remainder of the string is converted to an unsigned long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter ‘A’ in either uppercase or lowercase represents 10, ‘B’ represents 11, and so forth, with ‘Z’ representing 35.)
If endptr is not NULL, and the base is supported, strtoul() stores the address of the first invalid character in *endptr. If there were no digits at all, strtoul() stores the original value of nptr in *endptr (and returns 0). In particular, if *nptr is not ‘�’ but **endptr is ‘�’ on return, the entire string is valid.
The strtoull() function works just like the strtoul() function but returns an unsigned long long value.
RETURN VALUE
The strtoul() function returns either the result of the conversion or, if there was a leading minus sign, the negation of the result of the conversion represented as an unsigned value, unless the original (nonnegated) value would overflow; in the latter case, strtoul() returns ULONG_MAX and sets errno to ERANGE. Precisely the same holds for strtoull() (with ULLONG_MAX instead of ULONG_MAX).
ERRORS
This function does not modify errno on success.
EINVAL
(not in C99) The given base contains an unsupported value.
ERANGE
The resulting value was out of range.
The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned).
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
strtoul(), strtoull(), strtouq() | Thread safety | MT-Safe locale |
STANDARDS
C11, POSIX.1-2008.
HISTORY
strtoul()
POSIX.1-2001, C89, SVr4.
strtoull()
POSIX.1-2001, C99.
NOTES
Since strtoul() can legitimately return 0 or ULONG_MAX (ULLONG_MAX for strtoull()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a nonzero value after the call.
In locales other than the “C” locale, other strings may be accepted. (For example, the thousands separator of the current locale may be supported.)
BSD also has
u_quad_t strtouq(const char *nptr, char **endptr, int base);
with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to strtoull() or to strtoul().
Negative values are considered valid input and are silently converted to the equivalent unsigned long value.
EXAMPLES
See the example on the strtol(3) manual page; the use of the functions described in this manual page is similar.
SEE ALSO
a64l(3), atof(3), atoi(3), atol(3), strtod(3), strtol(3), strtoumax(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
82 - Linux cli command XtGetValues
NAME 🖥️ XtGetValues 🖥️
obtain and set widget resources
SYNTAX
#include <X11/Intrinsic.h>
void XtSetValues(Widget w, ArgList args, Cardinal num_args);
void XtVaSetValues(Widget w, … );
void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);
void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );
void XtGetValues(Widget w, ArgList args, Cardinal num_args);
void XtVaGetValues(Widget w, … );
void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);
void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );
ARGUMENTS
args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.
base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.
num_args
Specifies the number of arguments in the argument list.
resources
Specifies the nonwidget resource list or values.
num_resources
Specifies the number of resources in the resource list.
- Specifies the widget.
…
Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.
DESCRIPTION
The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.
If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.
XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.
Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.
The XtSetSubvalues function stores resources into the structure identified by base.
The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.
If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.
The XtGetSubvalues function obtains resource values from the structure identified by base.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
83 - Linux cli command XML_DOM_ElementDeclpm
NAME 🖥️ XML_DOM_ElementDeclpm 🖥️
An XML ELEMENT declaration in XML::DOM
DESCRIPTION
XML::DOM::ElementDecl extends XML::DOM::Node but is not part of the DOM Level 1 specification.
This node represents an Element declaration, e.g.
<!ELEMENT address (street+, city, state, zip, country?)>
METHODS
getName
Returns the Element tagName.
getModel and setModel (model)
Returns and sets the model as a string, e.g. (street+, city, state, zip, country?) in the above example.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
84 - Linux cli command htole64
NAME 🖥️ htole64 🖥️
convert values between host and big-/little-endian byte order
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():
Since glibc 2.19:
_DEFAULT_SOURCE
In glibc up to and including 2.19:
_BSD_SOURCE
DESCRIPTION
These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.
The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.
The functions with names of the form “htobenn” convert from host byte order to big-endian order.
The functions with names of the form “htolenn” convert from host byte order to little-endian order.
The functions with names of the form “benntoh” convert from big-endian order to host byte order.
The functions with names of the form “lenntoh” convert from little-endian order to host byte order.
VERSIONS
Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).
STANDARDS
None.
HISTORY
glibc 2.9.
These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().
The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.
EXAMPLES
The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:
$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344
Program source
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
union {
uint32_t u32;
uint8_t arr[4];
} x;
x.arr[0] = 0x11; /* Lowest-address byte */
x.arr[1] = 0x22;
x.arr[2] = 0x33;
x.arr[3] = 0x44; /* Highest-address byte */
printf("x.u32 = %#x
“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }
SEE ALSO
bswap(3), byteorder(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
85 - Linux cli command Net_DNS_SEC_RSApm
NAME 🖥️ Net_DNS_SEC_RSApm 🖥️
DNSSEC RSA digital signature algorithm
SYNOPSIS
require Net::DNS::SEC::RSA; $signature = Net::DNS::SEC::RSA->sign( $sigdata, $private ); $validated = Net::DNS::SEC::RSA->verify( $sigdata, $keyrr, $sigbin );
DESCRIPTION
Implementation of RSA digital signature generation and verification procedures.
sign
$signature = Net::DNS::SEC::RSA->sign( $sigdata, $private );
Generates the wire-format signature from the sigdata octet string and the appropriate private key object.
verify
$validated = Net::DNS::SEC::RSA->verify( $sigdata, $keyrr, $sigbin );
Verifies the signature over the sigdata octet string using the specified public key resource record.
ACKNOWLEDGMENT
Thanks are due to Eric Young and the many developers and contributors to the OpenSSL cryptographic library.
COPYRIGHT
Copyright (c)2014,2018 Dick Franks.
All rights reserved.
LICENSE
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SEE ALSO
Net::DNS, Net::DNS::SEC, RFC8017, RFC3110, OpenSSL <http://www.openssl.org/docs>
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
86 - Linux cli command round
NAME 🖥️ round 🖥️
round to nearest integer, away from zero
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double round(double x);
float roundf(float x);
long double roundl(long double x);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
round(), roundf(), roundl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
DESCRIPTION
These functions round x to the nearest integer, but round halfway cases away from zero (regardless of the current rounding direction, see fenv(3)), instead of to the nearest even integer like rint(3).
For example, round(0.5) is 1.0, and round(-0.5) is -1.0.
RETURN VALUE
These functions return the rounded integer value.
If x is integral, +0, -0, NaN, or infinite, x itself is returned.
ERRORS
No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
round(), roundf(), roundl() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
glibc 2.1. C99, POSIX.1-2001.
NOTES
POSIX.1-2001 contains text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)
If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lround(3) instead.
SEE ALSO
ceil(3), floor(3), lround(3), nearbyint(3), rint(3), trunc(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
87 - Linux cli command Spreadsheet_ParseExcelpm
NAME 🖥️ Spreadsheet_ParseExcelpm 🖥️
Read information from an Excel file.
SYNOPSIS
#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls); if ( !defined $workbook ) { die $parser->error(), “. “; } for my $worksheet ( $workbook->worksheets() ) { my ( $row_min, $row_max ) = $worksheet->row_range(); my ( $col_min, $col_max ) = $worksheet->col_range(); for my $row ( $row_min .. $row_max ) { for my $col ( $col_min .. $col_max ) { my $cell = $worksheet->get_cell( $row, $col ); next unless $cell; print “Row, Col = ($row, $col) “; print “Value = “, $cell->value(), " “; print “Unformatted = “, $cell->unformatted(), " “; print " “; } } }
DESCRIPTION
The Spreadsheet::ParseExcel module can be used to read information from Excel 95-2003 binary files.
The module cannot read files in the Excel 2007 Open XML XLSX format. See the Spreadsheet::XLSX module instead.
Parser
new()
The new()
method is used to create a new Spreadsheet::ParseExcel
parser object.
my $parser = Spreadsheet::ParseExcel->new();
It is possible to pass a password to decrypt an encrypted file:
$parser = Spreadsheet::ParseExcel->new( Password => secret );
Only the default Excel encryption scheme is currently supported. See Decryption.
As an advanced feature it is also possible to pass a call-back handler to the parser to control the parsing of the spreadsheet.
$parser = Spreadsheet::ParseExcel->new( CellHandler => \cell_handler, NotSetCell => 1, );
The call-back can be used to ignore certain cells or to reduce memory usage. See the section Reducing the memory usage of Spreadsheet::ParseExcel for more information.
parse($filename, $formatter)
The Parser parse()
method returns a Workbook object.
my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls);
If an error occurs parse()
returns undef
. In general, programs should contain a test for failed parsing as follows:
my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls); if ( !defined $workbook ) { die $parser->error(), “. “; }
The $filename
parameter is generally the file to be parsed. However, it can also be a filehandle or a scalar reference.
The optional $formatter
parameter can be an reference to a Formatter Class to format the value of cells. This is useful for parsing workbooks with Unicode or Asian characters:
my $parser = Spreadsheet::ParseExcel->new(); my $formatter = Spreadsheet::ParseExcel::FmtJapan->new(); my $workbook = $parser->parse( Book1.xls, $formatter );
The Spreadsheet::ParseExcel::FmtJapan formatter also supports Unicode. If you encounter any encoding problems with the default formatter try that instead.
error()
The Parser error()
method returns an error string if a parse()
fails:
my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls); if ( !defined $workbook ) { die $parser->error(), “. “; }
If you wish to generate you own error string you can use the error_code()
method instead (see below). The error()
and error_code()
values are as follows:
error() error_code() ======= ============ 0 File not found 1 No Excel data found in file 2 File is encrypted 3
The error_code()
method is explained below.
Spreadsheet::ParseExcel will try to decrypt an encrypted Excel file using the default password or a user supplied password passed to new()
, see above. If these fail the module will return the File is encrypted
error. Only the default Excel encryption scheme is currently supported, see Decryption.
error_code()
The Parser error_code()
method returns an error code if a parse()
fails:
my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls); if ( !defined $workbook ) { die “Got error code “, $parser->error_code, “. “; }
This can be useful if you wish to employ you own error strings or error handling methods.
Workbook
A Spreadsheet::ParseExcel::Workbook
is created via the Spreadsheet::ParseExcel
parse()
method:
my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls);
The main methods of the Workbook class are:
$workbook->worksheets() $workbook->worksheet() $workbook->worksheet_count() $workbook->get_filename()
These more commonly used methods of the Workbook class are outlined below. The other, less commonly used, methods are documented in Spreadsheet::ParseExcel::Worksheet.
worksheets()
Returns an array of Worksheet objects. This was most commonly used to iterate over the worksheets in a workbook:
for my $worksheet ( $workbook->worksheets() ) { … }
worksheet()
The worksheet()
method returns a single Worksheet
object using either its name or index:
$worksheet = $workbook->worksheet(Sheet1); $worksheet = $workbook->worksheet(0);
Returns undef
if the sheet name or index doesn’t exist.
worksheet_count()
The worksheet_count()
method returns the number of Worksheet objects in the Workbook.
my $worksheet_count = $workbook->worksheet_count();
get_filename()
The get_filename()
method returns the name of the Excel file of undef
if the data was read from a filehandle rather than a file.
my $filename = $workbook->get_filename();
Other Workbook Methods
For full documentation of the methods available via a Workbook object see Spreadsheet::ParseExcel::Workbook.
Worksheet
The Spreadsheet::ParseExcel::Worksheet
class encapsulates the properties of an Excel worksheet.
A Worksheet object is obtained via the worksheets() or worksheet() methods.
for my $worksheet ( $workbook->worksheets() ) { … } # Or: $worksheet = $workbook->worksheet(Sheet1); $worksheet = $workbook->worksheet(0);
The most commonly used methods of the Worksheet class are:
$worksheet->get_cell() $worksheet->row_range() $worksheet->col_range() $worksheet->get_name()
The Spreadsheet::ParseExcel::Worksheet class exposes a lot of methods but in general very few are required unless you are writing an advanced filter.
The most commonly used methods are detailed below. The others are documented in Spreadsheet::ParseExcel::Worksheet.
get_cell($row, $col)
Return the Cell object at row $row
and column $col
if it is defined. Otherwise returns undef.
my $cell = $worksheet->get_cell($row, $col);
row_range()
Returns a two-element list ($min, $max)
containing the minimum and maximum defined rows in the worksheet. If there is no row defined $max
is smaller than $min
.
my ( $row_min, $row_max ) = $worksheet->row_range();
col_range()
Returns a two-element list ($min, $max)
containing the minimum and maximum of defined columns in the worksheet. If there is no column defined $max
is smaller than $min
.
my ( $col_min, $col_max ) = $worksheet->col_range();
get_name()
The get_name()
method returns the name of the worksheet, such as ‘Sheet1’.
my $name = $worksheet->get_name();
Other Worksheet Methods
For other, less commonly used, Worksheet methods see Spreadsheet::ParseExcel::Worksheet.
Cell
The Spreadsheet::ParseExcel::Cell
class has the following main methods.
$cell->value() $cell->unformatted()
value()
The value()
method returns the formatted value of the cell.
my $value = $cell->value();
Formatted in this sense refers to the numeric format of the cell value. For example a number such as 40177 might be formatted as 40,117, 40117.000 or even as the date 2009/12/30.
If the cell doesn’t contain a numeric format then the formatted and unformatted cell values are the same, see the unformatted()
method below.
For a defined $cell
the value()
method will always return a value.
In the case of a cell with formatting but no numeric or string contents the method will return the empty string .
unformatted()
The unformatted()
method returns the unformatted value of the cell.
my $unformatted = $cell->unformatted();
Returns the cell value without a numeric format. See the value()
method above.
Other Cell Methods
For other, less commonly used, Worksheet methods see Spreadsheet::ParseExcel::Cell.
Format
The Spreadsheet::ParseExcel::Format
class has the following properties:
Format properties
$format->{Font} $format->{AlignH} $format->{AlignV} $format->{Indent} $format->{Wrap} $format->{Shrink} $format->{Rotate} $format->{JustLast} $format->{ReadDir} $format->{BdrStyle} $format->{BdrColor} $format->{BdrDiag} $format->{Fill} $format->{Lock} $format->{Hidden} $format->{Style}
These properties are generally only of interest to advanced users. Casual users can skip this section.
$format->{Font}
Returns the Font object for the Format.
$format->{AlignH}
Returns the horizontal alignment of the format where the value has the following meaning:
0 => No alignment 1 => Left 2 => Center 3 => Right 4 => Fill 5 => Justify 6 => Center across 7 => Distributed/Equal spaced
$format->{AlignV}
Returns the vertical alignment of the format where the value has the following meaning:
0 => Top 1 => Center 2 => Bottom 3 => Justify 4 => Distributed/Equal spaced
$format->{Indent}
Returns the indent level of the Left
horizontal alignment.
$format->{Wrap}
Returns true if textwrap is on.
$format->{Shrink}
Returns true if Shrink to fit is set for the format.
$format->{Rotate}
Returns the text rotation. In Excel97+, it returns the angle in degrees of the text rotation.
In Excel95 or earlier it returns a value as follows:
0 => No rotation 1 => Top down 2 => 90 degrees anti-clockwise, 3 => 90 clockwise
$format->{JustLast}
Return true if the justify last property is set for the format.
$format->{ReadDir}
Returns the direction that the text is read from.
$format->{BdrStyle}
Returns an array ref of border styles as follows:
[ $left, $right, $top, $bottom ]
$format->{BdrColor}
Returns an array ref of border color indexes as follows:
[ $left, $right, $top, $bottom ]
$format->{BdrDiag}
Returns an array ref of diagonal border kind, style and color index as follows:
[$kind, $style, $color ]
Where kind is:
0 => None 1 => Right-Down 2 => Right-Up 3 => Both
$format->{Fill}
Returns an array ref of fill pattern and color indexes as follows:
[ $pattern, $front_color, $back_color ]
$format->{Lock}
Returns true if the cell is locked.
$format->{Hidden}
Returns true if the cell is Hidden.
$format->{Style}
Returns true if the format is a Style format.
Font
Spreadsheet::ParseExcel::Font
Format class has these properties:
Font Properties
$font->{Name} $font->{Bold} $font->{Italic} $font->{Height} $font->{Underline} $font->{UnderlineStyle} $font->{Color} $font->{Strikeout} $font->{Super}
$font->{Name}
Returns the name of the font, for example ‘Arial’.
$font->{Bold}
Returns true if the font is bold.
$font->{Italic}
Returns true if the font is italic.
$font->{Height}
Returns the size (height) of the font.
$font->{Underline}
Returns true if the font in underlined.
$font->{UnderlineStyle}
Returns the style of an underlined font where the value has the following meaning:
0 => None 1 => Single 2 => Double 33 => Single accounting 34 => Double accounting
$font->{Color}
Returns the color index for the font. The mapping to an RGB color is defined by each workbook.
The index can be converted to a RGB string using the $workbook-
ColorIdxToRGB()> Parser method.
(Older versions of Spreadsheet::ParseExcel
provided the ColorIdxToRGB
class method, which is deprecated.)
$font->{Strikeout}
Returns true if the font has the strikeout property set.
$font->{Super}
Returns one of the following values if the superscript or subscript property of the font is set:
0 => None 1 => Superscript 2 => Subscript
Formatter Class
Formatters can be passed to the parse()
method to deal with Unicode or Asian formatting.
Spreadsheet::ParseExcel includes 2 formatter classes. FmtDefault
and FmtJapanese
. It is also possible to create a user defined formatting class.
The formatter class Spreadsheet::ParseExcel::Fmt*
should provide the following functions:
ChkType($self, $is_numeric, $format_index)
Method to check the type of data in the cell. Should return Date
, Numeric
or Text
. It is passed the following parameters:
$self
A scalar reference to the Formatter object.
$is_numeric
If true, the value seems to be number.
$format_index
The index number for the cell Format object.
TextFmt($self, $string_data, $string_encoding)
Converts the string data in the cell into the correct encoding. It is passed the following parameters:
$self
A scalar reference to the Formatter object.
$string_data
The original string/text data.
$string_encoding
The character encoding of original string/text.
ValFmt($self, $cell, $workbook)
Convert the original unformatted cell value into the appropriate formatted value. For instance turn a number into a formatted date. It is passed the following parameters:
$self
A scalar reference to the Formatter object.
$cell
A scalar reference to the Cell object.
$workbook
A scalar reference to the Workbook object.
FmtString($self, $cell, $workbook)
Get the format string for the Cell. It is passed the following parameters:
$self
A scalar reference to the Formatter object.
$cell
A scalar reference to the Cell object.
$workbook
A scalar reference to the Workbook object.
Reducing the memory usage of Spreadsheet::ParseExcel
In some cases a Spreadsheet::ParseExcel
application may consume a lot of memory when processing a large Excel file and, as a result, may fail to complete. The following explains why this can occur and how to resolve it.
Spreadsheet::ParseExcel
processes an Excel file in two stages. In the first stage it extracts the Excel binary stream from the OLE container file using OLE::Storage_Lite
. In the second stage it parses the binary stream to read workbook, worksheet and cell data which it then stores in memory. The majority of the memory usage is required for storing cell data.
The reason for this is that as the Excel file is parsed and each cell is encountered a cell handling function creates a relatively large nested cell object that contains the cell value and all of the data that relates to the cell formatting. For large files (a 10MB Excel file on a 256MB system) this overhead can cause the system to grind to a halt.
However, in a lot of cases when an Excel file is being processed the only information that is required are the cell values. In these cases it is possible to avoid most of the memory overhead by specifying your own cell handling function and by telling Spreadsheet::ParseExcel not to store the parsed cell data. This is achieved by passing a cell handler function to new()
when creating the parse object. Here is an example.
#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new( CellHandler => \cell_handler, NotSetCell => 1 ); my $workbook = $parser->parse(file.xls); sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; # Do something useful with the formatted cell value print $cell->value(), " “; }
The user specified cell handler is passed as a code reference to new()
along with the parameter NotSetCell
which tells Spreadsheet::ParseExcel not to store the parsed cell. Note, you don’t have to iterate over the rows and columns, this happens automatically as part of the parsing.
The cell handler is passed 5 arguments. The first, $workbook
, is a reference to the Spreadsheet::ParseExcel::Workbook
object that represent the parsed workbook. This can be used to access any of the Spreadsheet::ParseExcel::Workbook
methods, see Workbook. The second $sheet_index
is the zero-based index of the worksheet being parsed. The third and fourth, $row
and $col
, are the zero-based row and column number of the cell. The fifth, $cell
, is a reference to the Spreadsheet::ParseExcel::Cell
object. This is used to extract the data from the cell. See Cell for more information.
This technique can be useful if you are writing an Excel to database filter since you can put your DB calls in the cell handler.
If you don’t want all of the data in the spreadsheet you can add some control logic to the cell handler. For example we can extend the previous example so that it only prints the first 10 rows of the first two worksheets in the parsed workbook by adding some if()
statements to the cell handler:
#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new( CellHandler => \cell_handler, NotSetCell => 1 ); my $workbook = $parser->parse(file.xls); sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; # Skip some worksheets and rows (inefficiently). return if $sheet_index >= 3; return if $row >= 10; # Do something with the formatted cell value print $cell->value(), " “; }
However, this still processes the entire workbook. If you wish to save some additional processing time you can abort the parsing after you have read the data that you want, using the workbook ParseAbort
method:
#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new( CellHandler => \cell_handler, NotSetCell => 1 ); my $workbook = $parser->parse(file.xls); sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; # Skip some worksheets and rows (more efficiently). if ( $sheet_index >= 1 and $row >= 10 ) { $workbook->ParseAbort(1); return; } # Do something with the formatted cell value print $cell->value(), " “; }
Decryption
If a workbook is protected then Excel will encrypt the file whether a password is supplied or not. As of version 0.59 Spreadsheet::ParseExcel supports decrypting Excel workbooks using a default or user supplied password. However, only the following encryption scheme is supported:
Office 97/2000 Compatible encryption
The following encryption methods are not supported:
Weak Encryption (XOR) RC4, Microsoft Base Cryptographic Provider v1.0 RC4, Microsoft Base DSS and Diffie-Hellman Cryptographic Provider RC4, Microsoft DH SChannel Cryptographic Provider RC4, Microsoft Enhanced Cryptographic Provider v1.0 RC4, Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider RC4, Microsoft Enhanced RSA and AES Cryptographic Provider RC4, Microsoft RSA SChannel Cryptographic Provider RC4, Microsoft Strong Cryptographic Provider
See the following for more information on Excel encryption: <http://office.microsoft.com/en-us/office-2003-resource-kit/important-aspects-of-password-and-encryption-protection-HA001140311.aspx>.
KNOWN PROBLEMS
This module cannot read the values of formulas from files created with Spreadsheet::WriteExcel unless the user specified the values when creating the file (which is generally not the case). The reason for this is that Spreadsheet::WriteExcel writes the formula but not the formula result since it isn’t in a position to calculate arbitrary Excel formulas without access to Excel’s formula engine.
If Excel has date fields where the specified format is equal to the system-default for the short-date locale, Excel does not store the format, but defaults to an internal format which is system dependent. In these cases ParseExcel uses the date format ‘yyyy-mm-dd’.
REPORTING A BUG
Please report bugs on GitHub with a complete, working, sample application and a test xls file.
<https://github.com/jmcnamara/spreadsheet-parseexcel/issues>
SEE ALSO
xls2csv by Ken Prows <http://search.cpan.org/~ken/xls2csv-1.06/script/xls2csv>.
xls2csv and xlscat by H.Merijn Brand (these utilities are part of Spreadsheet::Read, see below).
excel2txt by Ken Youens-Clark, <http://search.cpan.org/~kclark/excel2txt/excel2txt>. This is an excellent example of an Excel filter using Spreadsheet::ParseExcel. It can produce CSV, Tab delimited, Html, XML and Yaml.
XLSperl by Jon Allen <http://search.cpan.org/~jonallen/XLSperl/bin/XLSperl>. This application allows you to use Perl one-liners with Microsoft Excel files.
Spreadsheet::XLSX <http://search.cpan.org/~dmow/Spreadsheet-XLSX/lib/Spreadsheet/XLSX.pm> by Dmitry Ovsyanko. A module with a similar interface to Spreadsheet::ParseExcel for parsing Excel 2007 XLSX OpenXML files.
Spreadsheet::Read <http://search.cpan.org/~hmbrand/Spreadsheet-Read/Read.pm> by H.Merijn Brand. A single interface for reading several different spreadsheet formats.
Spreadsheet::WriteExcel <http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm>. A perl module for creating new Excel files.
Spreadsheet::ParseExcel::SaveParser <http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel/lib/Spreadsheet/ParseExcel/SaveParser.pm>. This is a combination of Spreadsheet::ParseExcel and Spreadsheet::WriteExcel and it allows you to rewrite an Excel file. See the following example <http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#MODIFYING_AND_REWRITING_EXCEL_FILES>. It is part of the Spreadsheet::ParseExcel distro.
Text::CSV_XS <http://search.cpan.org/~hmbrand/Text-CSV_XS/CSV_XS.pm> by H.Merijn Brand. A fast and rigorous module for reading and writing CSV data. Don’t consider rolling your own CSV handling, use this module instead.
DONATIONS
If you’d care to donate to the Spreadsheet::ParseExcel project, you can do so via PayPal: <http://tinyurl.com/7ayes>
TODO
The current maintenance work is directed towards making the documentation more useful, improving and simplifying the API, and improving the maintainability of the code base. After that new features will be added.
Fix open bugs and documentation for SaveParser.
Add Formula support, Hyperlink support, Named Range support.
Improve Spreadsheet::ParseExcel::SaveParser compatibility with Spreadsheet::WriteExcel.
Improve Unicode and other encoding support. This will probably require dropping support for perls prior to 5.8+.
ACKNOWLEDGEMENTS
From Kawai Takanori:
First of all, I would like to acknowledge the following valuable programs and modules: XHTML, OLE::Storage and Spreadsheet::WriteExcel.
In no particular order: Yamaji Haruna, Simamoto Takesi, Noguchi Harumi, Ikezawa Kazuhiro, Suwazono Shugo, Hirofumi Morisada, Michael Edwards, Kim Namusk, Slaven Rezic, Grant Stevens, H.Merijn Brand and many many people + Kawai Mikako.
Alexey Mazurin added the decryption facility.
DISCLAIMER OF WARRANTY
Because this software is licensed free of charge, there is no warranty for the software, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the software as is without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the software is with you. Should the software prove defective, you assume the cost of all necessary servicing, repair, or correction.
In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute the software as permitted by the above licence, be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the software (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the software to operate with any other software), even if such holder or other party has been advised of the possibility of such damages.
LICENSE
Either the Perl Artistic Licence <http://dev.perl.org/licenses/artistic.html> or the GPL <http://www.opensource.org/licenses/gpl-license.php>
AUTHOR
Current maintainer 0.60+: Douglas Wilson [email protected]
Maintainer 0.40-0.59: John McNamara [email protected]
Maintainer 0.27-0.33: Gabor Szabo [email protected]
Original author: Kawai Takanori (Hippo2000) [email protected]
COPYRIGHT
Copyright (c) 2014 Douglas Wilson
Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
Copyright (c) 2000-2006 Kawai Takanori
All rights reserved. This is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
88 - Linux cli command procps_pids
NAME 🖥️ procps_pids 🖥️
API to access process information in the /proc filesystem
SYNOPSIS
#include <libproc2/pids.h>
int procps_pids_new (struct pids_info **info, enum pids_item *items, int numitems);
int procps_pids_ref (struct pids_info *info);
int procps_pids_unref (struct pids_info **info);
struct pids_stack *procps_pids_get (
struct pids_info *info,
enum pids_fetch_type which);
struct pids_fetch *procps_pids_reap (
struct pids_info *info,
enum pids_fetch_type which);
struct pids_fetch *procps_pids_select (
struct pids_info *info,
unsigned *these,
int numthese,
enum pids_select_type which);
struct pids_stack **procps_pids_sort (
struct pids_info *info,
struct pids_stack *stacks[],
int numstacked,
enum pids_item sortitem,
enum pids_sort_order order);
int procps_pids_reset (
struct pids_info *info,
enum pids_item *newitems,
int newnumitems);
struct pids_stack *fatal_proc_unmounted (
struct pids_info *info,
int return_self);
Link with -lproc2.
DESCRIPTION
Overview
Central to this interface is a simple `result’ structure reflecting an `item’ plus its value (in a union with standard C language types as members). All `result’ structures are automatically allocated and provided by the library.
By specifying an array of `items’, these structures can be organized as a `stack’, potentially yielding many results with a single function call. Thus, a `stack’ can be viewed as a variable length record whose content and order is determined solely by the user.
As part of this interface there are two unique enumerators. The `noop’ and `extra’ items exist to hold user values. They are never set by the library, but the `extra’ result will be zeroed with each library interaction.
The pids.h file will be an essential document during user program development. There you will find available items, their return type (the `result’ struct member name) and the source for such values. Additional enumerators and structures are also documented there.
Usage
The following would be a typical sequence of calls to this interface.
1. fatal_proc_unmounted()
2. procps_pids_new()
3. procps_pids_get(), procps_pids_reap() or procps_pids_select()
4. procps_pids_unref()
The get function is an iterator for successive PIDs/TIDs, returning those `items’ previously identified via new or reset.
Two functions support unpredictable variable outcomes. The reap function gathers data for all processes while the select function deals with specific PIDs or UIDs. Both can return multiple `stacks’ each containing multiple `result’ structures. Optionally, a user may choose to sort such results
To exploit any `stack’, and access individual `result’ structures, a relative_enum is required as shown in the VAL macro defined in the header file. Such values could be hard coded as: 0 through numitems-1. However, this need is typically satisfied by creating your own enumerators corresponding to the order of the `items’ array.
Caveats
The <pids> API differs from others in that those items of interest must be provided at new or reset time, the latter being unique to this API. If either the items or numitems parameter is zero at new time, then reset becomes mandatory before issuing any other call.
For the new and unref functions, the address of an info struct pointer must be supplied. With new it must have been initialized to NULL. With unref it will be reset to NULL if the reference count reaches zero.
The get and reap functions use the which parameter to specify whether just tasks or both tasks and threads are to be fetched.
The select function requires an array of PIDs or UIDs as these along with numthese to identify which processes are to be fetched. This function then operates as a subset of reap.
When using the sort function, the parameters stacks and numstacked would normally be those returned in the `pids_fetch’ structure.
Lastly, a fatal_proc_unmounted function may be called before any other function to ensure that the /proc/ directory is mounted. As such, the info parameter would be NULL and the return_self parameter zero. If, however, some items are desired for the issuing program (a return_self other than zero) then the new call must precede it to identify the items and obtain the required info pointer.
RETURN VALUE
Functions Returning an `int'
An error will be indicated by a negative number that is always the inverse of some well known errno.h value.
Success is indicated by a zero return value. However, the ref and unref functions return the current info structure reference count.
Functions Returning an `address'
An error will be indicated by a NULL return pointer with the reason found in the formal errno value.
Success is indicated by a pointer to the named structure. However, if one survives the fatal_proc_unmounted call, NULL is always returned when return_self is zero.
DEBUGGING
To aid in program development, there are two procps-ng provisions that can be exploited.
The first is a supplied file named `libproc.supp’ which may be useful when developing a multi-threaded application. When used with the valgrind `–suppressions=’ option, warnings associated with the procps library itself are avoided.
Such warnings arise because the library handles heap based allocations in a thread-safe manner. A single-threaded application will not receive those warnings.
The second provision can help ensure `result’ member references agree with library expectations. It assumes that a supplied macro in the header file is used to access the `result’ value.
This feature can be activated through either of the following methods and any discrepancies will be written to stderr.
Add CFLAGS=’-DXTRA_PROCPS_DEBUG’ to any other ./configure options your project may employ.
Add #include <procps/xtra-procps-debug.h> to any program after the #include <procps/pids.h>.
This verification feature incurs substantial overhead. Therefore, it is important that it not be activated for a production/release build.
ENVIRONMENT VARIABLE(S)
The value set for the following is unimportant, just its presence.
LIBPROC_HIDE_KERNEL
This will hide kernel threads which would otherwise be returned with a procps_pids_get, procps_pids_select or procps_pids_reap call.
SEE ALSO
procps(3), procps_misc(3), proc(5).
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
89 - Linux cli command scalbl
NAME 🖥️ scalbl 🖥️
multiply floating-point number by integral power of radix (OBSOLETE)
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
[[deprecated]] double scalb(double x, double exp);
[[deprecated]] float scalbf(float x, float exp);
[[deprecated]] long double scalbl(long double x, long double exp);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
scalb():
_XOPEN_SOURCE >= 500
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
scalbf(), scalbl():
_XOPEN_SOURCE >= 600
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:
x * FLT_RADIX ** exp
The definition of FLT_RADIX can be obtained by including <float.h>.
RETURN VALUE
On success, these functions return x * FLT_RADIX ** exp.
If x or exp is a NaN, a NaN is returned.
If x is positive infinity (negative infinity), and exp is not negative infinity, positive infinity (negative infinity) is returned.
If x is +0 (-0), and exp is not positive infinity, +0 (-0) is returned.
If x is zero, and exp is positive infinity, a domain error occurs, and a NaN is returned.
If x is an infinity, and exp is negative infinity, a domain error occurs, and a NaN is returned.
If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.
If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.
ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions.
The following errors can occur:
Domain error: x is 0, and exp is positive infinity, or x is positive infinity and exp is negative infinity and the other argument is not a NaN
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.
Range error, overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.
Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
scalb(), scalbf(), scalbl() | Thread safety | MT-Safe |
STANDARDS
None.
HISTORY
scalb()
4.3BSD. Obsolescent in POSIX.1-2001; Removed in POSIX.1-2008, recommending the use of scalbln(3), scalblnf(3), or scalblnl(3) instead.
BUGS
Before glibc 2.20, these functions did not set errno for domain and range errors.
SEE ALSO
ldexp(3), scalbln(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
90 - Linux cli command Net_Server_Proto_SSLpm
NAME 🖥️ Net_Server_Proto_SSLpm 🖥️
Net::Server SSL protocol.
SYNOPSIS
Until this release, it was preferable to use the Net::Server::Proto::SSLEAY module. Recent versions include code that overcomes original limitations.
See Net::Server::Proto. See Net::Server::Proto::SSLEAY.
use base qw(Net::Server::HTTP); main->run( proto => ssl, SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, ); # OR sub SSL_key_file { “/path/to/my/file.key” } sub SSL_cert_file { “/path/to/my/file.crt” } main->run(proto = ssl); # OR main->run( port => [443, 8443, “80/tcp”], # bind to two ssl ports and one tcp proto => “ssl”, # use ssl as the default ipv => “*”, # bind both IPv4 and IPv6 interfaces SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, ); # OR main->run(port => [{ port => “443”, proto => “ssl”, # ipv => 4, # default - only do IPv4 SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, }, { port => “8443”, proto => “ssl”, ipv => “*”, # IPv4 and IPv6 SSL_key_file => “/path/to/my/file2.key”, # separate key SSL_cert_file => “/path/to/my/file2.crt”, # separate cert SSL_foo => 1, # Any key prefixed with SSL_ passed as a port hashref # key/value will automatically be passed to IO::Socket::SSL }]);
DESCRIPTION
Protocol module for Net::Server based on IO::Socket::SSL. This module implements a secure socket layer over tcp (also known as SSL) via the IO::Socket::SSL module. If this module does not work in your situation, please also consider using the SSLEAY protocol (Net::Server::Proto::SSLEAY) which interfaces directly with Net::SSLeay. See Net::Server::Proto.
If you know that your server will only need IPv4 (which is the default for Net::Server), you can load IO::Socket::SSL in inet4 mode which will prevent it from using Socket6, IO::Socket::IP, or IO::Socket::INET6 since they would represent additional and unused overhead.
use IO::Socket::SSL qw(inet4); use base qw(Net::Server::Fork); _ _PACKAGE_ _->run(proto => “ssl”);
PARAMETERS
In addition to the normal Net::Server parameters, any of the SSL parameters from IO::Socket::SSL may also be specified. See IO::Socket::SSL for information on setting this up. All arguments prefixed with SSL_ will be passed to the IO::Socket::SSL->configure method.
BUGS
Until version Net::Server version 2, Net::Server::Proto::SSL used the default IO::Socket::SSL::accept method. This old approach introduces a DDOS vulnerability into the server, where the socket is accepted, but the parent server then has to block until the client negotiates the SSL connection. This has now been overcome by overriding the accept method and accepting the SSL negotiation after the parent socket has had the chance to go back to listening.
LICENCE
Distributed under the same terms as Net::Server
THANKS
Thanks to Vadim for pointing out the IO::Socket::SSL accept was returning objects blessed into the wrong class.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
91 - Linux cli command Tk_DropSitepm
NAME 🖥️ Tk_DropSitepm 🖥️
Receive side of Drag & Drop abstraction
SYNOPSIS
use Tk::DropSite qw(…); $widget->DropSite(-entercommand => …, -dropcommand => …, -motioncommand => …, -dropcommand => …, );
DESCRIPTION
DropSite
creates an object which represents a site on which things may be “Dropped”.
A DropSite provides the following methods:
$site->Enter($token,$event)
$site->Leave($token,$event)
$site->Motion($token,$event)
$site->Drop($token,$event)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
92 - Linux cli command Tk_Textpm
NAME 🖥️ Tk_Textpm 🖥️
Create and manipulate Text widgets
SYNOPSIS
$text
= $parent
->Text(?options?);
-background -highlightbackground -insertontime -selectborderwidth -borderwidth -highlightcolor -insertwidth -selectforeground -cursor -highlightthickness -padx -setgrid -exportselection -insertbackground -pady -takefocus -font -insertborderwidth -relief -xscrollcommand -foreground -insertofftime -selectbackground -yscrollcommand
WIDGET-SPECIFIC OPTIONS
Name: height
Class: Height
Switch: -height
Specifies the desired height for the window, in units of characters in the font given by the -font option. Must be at least one.
Name: spacing1
Class: Spacing1
Switch: -spacing1
Requests additional space above each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the first line on the display. This option may be overridden with -spacing1 options in tags.
Name: spacing2
Class: Spacing2
Switch: -spacing2
For lines that wrap (so that they cover more than one line on the display) this option specifies additional space to provide between the display lines that represent a single line of text. The value may have any of the standard forms for screen distances. This option may be overridden with -spacing2 options in tags.
Name: spacing3
Class: Spacing3
Switch: -spacing3
Requests additional space below each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the last line on the display. This option may be overridden with -spacing3 options in tags.
Name: state
Class: State
Switch: -state
Specifies one of two states for the text: normal or disabled. If the text is disabled then characters may not be inserted or deleted and no insertion cursor will be displayed, even if the input focus is in the widget.
Name: tabs
Class: Tabs
Switch: -tabs
Specifies a set of tab stops for the window. The option’s value consists of a list of screen distances giving the positions of the tab stops. Each position may optionally be followed in the next list element by one of the keywords left, right, center, or numeric, which specifies how to justify text relative to the tab stop. Left is the default; it causes the text following the tab character to be positioned with its left edge at the tab position. Right means that the right edge of the text following the tab character is positioned at the tab position, and center means that the text is centered at the tab position. Numeric means that the decimal point in the text is positioned at the tab position; if there is no decimal point then the least significant digit of the number is positioned just to the left of the tab position; if there is no number in the text then the text is right-justified at the tab position. For example, -tabs => [qw/2c left 4c 6c center/] creates three tab stops at two-centimeter intervals; the first two use left justification and the third uses center justification. If the list of tab stops does not have enough elements to cover all of the tabs in a text line, then Tk extrapolates new tab stops using the spacing and alignment from the last tab stop in the list. The value of the tabs option may be overridden by -tabs options in tags. If no -tabs option is specified, or if it is specified as an empty list, then Tk uses default tabs spaced every eight (average size) characters.
Name: width
Class: Width
Switch: -width
Specifies the desired width for the window in units of characters in the font given by the -font option. If the font doesn’t have a uniform width then the width of the character ``0’’ is used in translating from character units to screen units.
Name: wrap
Class: Wrap
Switch: -wrap
Specifies how to handle lines in the text that are too long to be displayed in a single line of the text’s window. The value must be none or char or word. A wrap mode of none means that each line of text appears as exactly one line on the screen; extra characters that don’t fit on the screen are not displayed. In the other modes each line of text will be broken up into several screen lines if necessary to keep all the characters visible. In char mode a screen line break may occur after any character; in word mode a line break will only be made at word boundaries.
DESCRIPTION
The Text method creates a new window (given by the $text
argument) and makes it into a text widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the text such as its default background color and relief. The text command returns the path name of the new window.
A text widget displays one or more lines of text and allows that text to be edited. Text widgets support four different kinds of annotations on the text, called tags, marks, embedded windows or embedded images. Tags allow different portions of the text to be displayed with different fonts and colors. In addition, perl/Tk callbacks can be associated with tags so that scripts are invoked when particular actions such as keystrokes and mouse button presses occur in particular ranges of the text. See “TAGS” below for more details.
The second form of annotation consists of marks, which are floating markers in the text. Marks are used to keep track of various interesting positions in the text as it is edited. See “MARKS” below for more details.
The third form of annotation allows arbitrary windows to be embedded in a text widget. See “EMBEDDED WINDOWS” below for more details.
The fourth form of annotation allows Tk images to be embedded in a text widget. See “EMBEDDED IMAGES” below for more details.
The Perl/Tk Text widget does not support undo/redo, use the TextUndo widget instead.
INDICES
Many of the methods for texts take one or more indices as arguments. An index is a string used to indicate a particular place within a text, such as a place to insert characters or one endpoint of a range of characters to delete. Indices have the syntax
base modifier modifier modifier …
Where base gives a starting point and the modifiers adjust the index from the starting point (e.g. move forward or backward one character). Every index must contain a base, but the modifiers are optional.
The base for an index must have one of the following forms:
line.char
Indicates char’th character on line line. Lines are numbered from 1 for consistency with other UNIX programs that use this numbering scheme. Within a line, characters are numbered from 0. If char is end then it refers to the newline character that ends the line.
@x,y
Indicates the character that covers the pixel whose x and y coordinates within the text’s window are x and y.
end
Indicates the end of the text (the character just after the last newline).
mark
Indicates the character just after the mark whose name is mark.
tag.first
Indicates the first character in the text that has been tagged with tag. This form generates an error if no characters are currently tagged with tag.
tag.last
Indicates the character just after the last one in the text that has been tagged with tag. This form generates an error if no characters are currently tagged with tag.
$widget
Indicates the position of the embedded window referenced by $widget
. This form generates an error if $widget
does not reference to an embedded window.
imageName
Indicates the position of the embedded image whose name is imageName. This form generates an error if there is no embedded image by the given name.
If the base could match more than one of the above forms, such as a mark and imageName both having the same value, then the form earlier in the above list takes precedence. If modifiers follow the base index, each one of them must have one of the forms listed below. Keywords such as chars and wordend may be abbreviated as long as the abbreviation is unambiguous.
+ count chars
Adjust the index forward by count characters, moving to later lines in the text if necessary. If there are fewer than count characters in the text after the current index, then set the index to the last character in the text. Spaces on either side of count are optional.
- count chars
Adjust the index backward by count characters, moving to earlier lines in the text if necessary. If there are fewer than count characters in the text before the current index, then set the index to the first character in the text. Spaces on either side of count are optional.
+ count lines
Adjust the index forward by count lines, retaining the same character position within the line. If there are fewer than count lines after the line containing the current index, then set the index to refer to the same character position on the last line of the text. Then, if the line is not long enough to contain a character at the indicated character position, adjust the character position to refer to the last character of the line (the newline). Spaces on either side of count are optional.
- count lines
Adjust the index backward by count lines, retaining the same character position within the line. If there are fewer than count lines before the line containing the current index, then set the index to refer to the same character position on the first line of the text. Then, if the line is not long enough to contain a character at the indicated character position, adjust the character position to refer to the last character of the line (the newline). Spaces on either side of count are optional.
linestart
Adjust the index to refer to the first character on the line.
lineend
Adjust the index to refer to the last character on the line (the newline).
wordstart
Adjust the index to refer to the first character of the word containing the current index. A word consists of any number of adjacent characters that are letters, digits, or underscores, or a single character that is not one of these.
wordend
Adjust the index to refer to the character just after the last one of the word containing the current index. If the current index refers to the last character of the text then it is not modified.
If more than one modifier is present then they are applied in left-to-right order. For example, the index ``end - 1 chars’’ refers to the next-to-last character in the text and ``insert wordstart - 1 c’’ refers to the character just before the first one in the word containing the insertion cursor.
TAGS
The first form of annotation in text widgets is a tag. A tag is a textual string that is associated with some of the characters in a text. Tags may contain arbitrary characters, but it is probably best to avoid using the the characters `` ’’ (space), +, or -: these characters have special meaning in indices, so tags containing them can’t be used as indices. There may be any number of tags associated with characters in a text. Each tag may refer to a single character, a range of characters, or several ranges of characters. An individual character may have any number of tags associated with it.
A priority order is defined among tags, and this order is used in implementing some of the tag-related functions described below. When a tag is defined (by associating it with characters or setting its display options or binding callbacks to it), it is given a priority higher than any existing tag. The priority order of tags may be redefined using the ``$text
->tagRaise’’ and ``$text
->tagLower’’ methods.
Tags serve three purposes in text widgets. First, they control the way information is displayed on the screen. By default, characters are displayed as determined by the background, font, and foreground options for the text widget. However, display options may be associated with individual tags using the ``$text
->tagConfigure’’ method. If a character has been tagged, then the display options associated with the tag override the default display style. The following options are currently supported for tags:
-background => color
Color specifies the background color to use for characters associated with the tag. It may have any of the forms accepted by Tk_GetColor.
-bgstipple => bitmap
Bitmap specifies a bitmap that is used as a stipple pattern for the background. It may have any of the forms accepted by Tk_GetBitmap. If bitmap hasn’t been specified, or if it is specified as an empty string, then a solid fill will be used for the background.
-borderwidth => pixels
Pixels specifies the width of a 3-D border to draw around the background. It may have any of the forms accepted by Tk_GetPixels. This option is used in conjunction with the -relief option to give a 3-D appearance to the background for characters; it is ignored unless the -background option has been set for the tag.
-elide => boolean
Elide specifies whether the data should be elided. Elided data is not displayed and takes no space on screen, but further on behaves just as normal data.
-data => value
Allows an arbitrary perl scalar value to be associated with the tag.
-fgstipple => bitmap
Bitmap specifies a bitmap that is used as a stipple pattern when drawing text and other foreground information such as underlines. It may have any of the forms accepted by Tk_GetBitmap. If bitmap hasn’t been specified, or if it is specified as an empty string, then a solid fill will be used.
-font => fontName
FontName is the name of a font to use for drawing characters. It may have any of the forms accepted by Tk_GetFontStruct.
-foreground => color
Color specifies the color to use when drawing text and other foreground information such as underlines. It may have any of the forms accepted by Tk_GetColor.
-justify => justify
If the first character of a display line has a tag for which this option has been specified, then justify determines how to justify the line. It must be one of left, right, or center. If a line wraps, then the justification for each line on the display is determined by the first character of that display line.
-lmargin1 => pixels
If the first character of a text line has a tag for which this option has been specified, then pixels specifies how much the line should be indented from the left edge of the window. Pixels may have any of the standard forms for screen distances. If a line of text wraps, this option only applies to the first line on the display; the -lmargin2 option controls the indentation for subsequent lines.
-lmargin2 => pixels
If the first character of a display line has a tag for which this option has been specified, and if the display line is not the first for its text line (i.e., the text line has wrapped), then pixels specifies how much the line should be indented from the left edge of the window. Pixels may have any of the standard forms for screen distances. This option is only used when wrapping is enabled, and it only applies to the second and later display lines for a text line.
-offset => pixels
Pixels specifies an amount by which the text’s baseline should be offset vertically from the baseline of the overall line, in pixels. For example, a positive offset can be used for superscripts and a negative offset can be used for subscripts. Pixels may have any of the standard forms for screen distances.
-overstrike => boolean
Specifies whether or not to draw a horizontal rule through the middle of characters. Boolean may have any of the forms accepted by Tk_GetBoolean.
-relief => relief
Relief specifies the 3-D relief to use for drawing backgrounds, in any of the forms accepted by Tk_GetRelief. This option is used in conjunction with the -borderwidth option to give a 3-D appearance to the background for characters; it is ignored unless the -background option has been set for the tag.
-rmargin => pixels
If the first character of a display line has a tag for which this option has been specified, then pixels specifies how wide a margin to leave between the end of the line and the right edge of the window. Pixels may have any of the standard forms for screen distances. This option is only used when wrapping is enabled. If a text line wraps, the right margin for each line on the display is determined by the first character of that display line.
-spacing1 => pixels
Pixels specifies how much additional space should be left above each text line, using any of the standard forms for screen distances. If a line wraps, this option only applies to the first line on the display.
-spacing2 => pixels
For lines that wrap, this option specifies how much additional space to leave between the display lines for a single text line. Pixels may have any of the standard forms for screen distances.
-spacing3 => pixels
Pixels specifies how much additional space should be left below each text line, using any of the standard forms for screen distances. If a line wraps, this option only applies to the last line on the display.
-tabs => tabList
TabList specifies a set of tab stops in the same form as for the -tabs option for the text widget. This option only applies to a display line if it applies to the first character on that display line. If this option is specified as an empty string, it cancels the option, leaving it unspecified for the tag (the default). If the option is specified as a non-empty string that is an empty list, such as -tabs = " “>, then it requests default 8-character tabs as described for the tabs widget option.
-underline => boolean
Boolean specifies whether or not to draw an underline underneath characters. It may have any of the forms accepted by Tk_GetBoolean.
-wrap => mode
Mode specifies how to handle lines that are wider than the text’s window. It has the same legal values as the -wrap option for the text widget: none, char, or word. If this tag option is specified, it overrides the -wrap option for the text widget.
If a character has several tags associated with it, and if their display options conflict, then the options of the highest priority tag are used. If a particular display option hasn’t been specified for a particular tag, or if it is specified as an empty string, then that option will never be used; the next-highest-priority tag’s option will used instead. If no tag specifies a particular display option, then the default style for the widget will be used.
The second purpose for tags is event bindings. You can associate bindings with a tag in much the same way you can associate bindings with a widget class: whenever particular X events occur on characters with the given tag, a given <perl/Tk callback|Tk::callbacks> will be executed. Tag bindings can be used to give behaviors to ranges of characters; among other things, this allows hypertext-like features to be implemented. For details, see the description of the tagBind widget method below.
The third use for tags is in managing the selection. See “THE SELECTION” below.
MARKS
The second form of annotation in text widgets is a mark. Marks are used for remembering particular places in a text. They are something like tags, in that they have names and they refer to places in the file, but a mark isn’t associated with particular characters. Instead, a mark is associated with the gap between two characters. Only a single position may be associated with a mark at any given time. If the characters around a mark are deleted the mark will still remain; it will just have new neighbor characters. In contrast, if the characters containing a tag are deleted then the tag will no longer have an association with characters in the file. Marks may be manipulated with the ``$text
->mark’’ text widget method, and their current locations may be determined by using the mark name as an index in methods.
Each mark also has a gravity, which is either left or right. The gravity for a mark specifies what happens to the mark when text is inserted at the point of the mark. If a mark has left gravity, then the mark is treated as if it were attached to the character on its left, so the mark will remain to the left of any text inserted at the mark position. If the mark has right gravity, new text inserted at the mark position will appear to the right of the mark. The gravity for a mark defaults to right.
The name space for marks is different from that for tags: the same name may be used for both a mark and a tag, but they will refer to different things.
Two marks have special significance. First, the mark insert is associated with the insertion cursor, as described under “THE INSERTION CURSOR” below. Second, the mark current is associated with the character closest to the mouse and is adjusted automatically to track the mouse position and any changes to the text in the widget (one exception: current is not updated in response to mouse motions if a mouse button is down; the update will be deferred until all mouse buttons have been released). Neither of these special marks may be deleted.
EMBEDDED WINDOWS
The third form of annotation in text widgets is an embedded window. Each embedded window annotation causes a window to be displayed at a particular point in the text. There may be any number of embedded windows in a text widget, and any widget may be used as an embedded window (subject to the usual rules for geometry management, which require the text window to be the parent of the embedded window or a descendant of its parent). The embedded window’s position on the screen will be updated as the text is modified or scrolled, and it will be mapped and unmapped as it moves into and out of the visible area of the text widget. Each embedded window occupies one character’s worth of index space in the text widget, and it may be referred to either by the name of its embedded window or by its position in the widget’s index space. If the range of text containing the embedded window is deleted then the window is destroyed.
When an embedded window is added to a text widget with the widgetCreate method, several configuration options may be associated with it. These options may be modified later with the widgetConfigure method. The following options are currently supported:
-align => where
If the window is not as tall as the line in which it is displayed, this option determines where the window is displayed in the line. Where must have one of the values top (align the top of the window with the top of the line), center (center the window within the range of the line), bottom (align the bottom of the window with the bottom of the line’s area), or baseline (align the bottom of the window with the baseline of the line).
-create => callback
Specifies a callback that may be evaluated to create the window for the annotation. If no -window option has been specified for the annotation this callback will be evaluated when the annotation is about to be displayed on the screen. Callback must create a window for the annotation and return the name of that window as its result. If the annotation’s window should ever be deleted, callback will be evaluated again the next time the annotation is displayed.
-padx => pixels
Pixels specifies the amount of extra space to leave on each side of the embedded window. It may have any of the usual forms defined for a screen distance (see Tk_GetPixels).
-pady => pixels
Pixels specifies the amount of extra space to leave on the top and on the bottom of the embedded window. It may have any of the usual forms defined for a screen distance (see Tk_GetPixels).
-stretch => boolean
If the requested height of the embedded window is less than the height of the line in which it is displayed, this option can be used to specify whether the window should be stretched vertically to fill its line. If the -pady option has been specified as well, then the requested padding will be retained even if the window is stretched.
-window => $widget
Specifies the name of a window to display in the annotation.
EMBEDDED IMAGES
The final form of annotation in text widgets is an embedded image. Each embedded image annotation causes an image to be displayed at a particular point in the text. There may be any number of embedded images in a text widget, and a particular image may be embedded in multiple places in the same text widget. The embedded image’s position on the screen will be updated as the text is modified or scrolled. Each embedded image occupies one character’s worth of index space in the text widget, and it may be referred to either by its position in the widget’s index space, or the name it is assigned when the image is inserted into the text widget with imageCreate. If the range of text containing the embedded image is deleted then that copy of the image is removed from the screen.
When an embedded image is added to a text widget with the image create method, a name unique to this instance of the image is returned. This name may then be used to refer to this image instance. The name is taken to be the value of the -name option (described below). If the -name option is not provided, the -image name is used instead. If the imageName is already in use in the text widget, then **#**nn is added to the end of the imageName, where nn is an arbitrary integer. This insures the imageName is unique. Once this name is assigned to this instance of the image, it does not change, even though the -image or -name values can be changed with image configure.
When an embedded image is added to a text widget with the imageCreate method, several configuration options may be associated with it. These options may be modified later with the image configure method. The following options are currently supported:
-align => where
If the image is not as tall as the line in which it is displayed, this option determines where the image is displayed in the line. Where must have one of the values top (align the top of the image with the top of the line), center (center the image within the range of the line), bottom (align the bottom of the image with the bottom of the line’s area), or baseline (align the bottom of the image with the baseline of the line).
-image => image
Specifies the name of the Tk image to display in the annotation. If image is not a valid Tk image, then an error is returned.
-name => ImageName
Specifies the name by which this image instance may be referenced in the text widget. If ImageName is not supplied, then the name of the Tk image is used instead. If the imageName is already in use, #nn is appended to the end of the name as described above.
-padx => pixels
Pixels specifies the amount of extra space to leave on each side of the embedded image. It may have any of the usual forms defined for a screen distance.
-pady => pixels
Pixels specifies the amount of extra space to leave on the top and on the bottom of the embedded image. It may have any of the usual forms defined for a screen distance.
THE SELECTION
Selection support is implemented via tags. If the exportSelection option for the text widget is true then the sel tag will be associated with the selection:
[1]
Whenever characters are tagged with sel the text widget will claim ownership of the selection.
[2]
Attempts to retrieve the selection will be serviced by the text widget, returning all the characters with the sel tag.
[3]
If the selection is claimed away by another application or by another window within this application, then the sel tag will be removed from all characters in the text.
[4]
Whenever the sel tag range changes a virtual event <<Selection>> is generated. The sel tag is automatically defined when a text widget is created, and it may not be deleted with the ``$text
->tagDelete’’ method. Furthermore, the selectBackground, selectBorderWidth, and selectForeground options for the text widget are tied to the -background, -borderwidth, and -foreground options for the sel tag: changes in either will automatically be reflected in the other.
THE INSERTION CURSOR
The mark named insert has special significance in text widgets. It is defined automatically when a text widget is created and it may not be unset with the ``$text
->markUnset’’ widget command. The insert mark represents the position of the insertion cursor, and the insertion cursor will automatically be drawn at this point whenever the text widget has the input focus.
THE MODIFIED FLAG
The text widget can keep track of changes to the content of the widget by means of the modified flag. Inserting or deleting text will set this flag. The flag can be queried, set and cleared programatically as well. Whenever the flag changes state a <<Modified>> virtual event is gener- ated. See the edit modified widget command for more details.
WIDGET METHODS
The Text method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.
The following additional methods are available for text widgets. In addition, the extended text widget methods as documented in “Mastering Perl/Tk” are included in this pod (with permission from the publisher, O’Reilly and Associates Inc.).
$text->adjustSelect
Moves the end point of the selection and anchor point to the mouse pointer location.
$text->bbox(index)
Returns a list of four elements describing the screen area of the character given by index. The first two elements of the list give the x and y coordinates of the upper-left corner of the area occupied by the character, and the last two elements give the width and height of the area. If the character is only partially visible on the screen, then the return value reflects just the visible part. If the character is not visible on the screen then the return value is an empty list.
$text->clipboardColumnCopy
Performs a rectangular copy of the currently selected text with basic compensation for tab characters.
$text->clipboardColumnCut
Performs a rectangular cut of the currently selected text with basic compensation for tab characters.
$text->clipboardColumnPaste
Performs a rectangular paste of the text in the clipboard. The upper-left corner is specified by the current position of the insert mark with basic compensation for tab characters.
$text->compare(index1, op, index2)
Compares the indices given by index1 and index2 according to the relational operator given by op, and returns 1 if the relationship is satisfied and 0 if it isn’t. Op must be one of the operators <, <=, ==, >=, >, or !=. If op is == then 1 is returned if the two indices refer to the same character, if op is < then 1 is returned if index1 refers to an earlier character in the text than index2, and so on.
$text->Contents(?args?)
Query or change the entire contents of the text widget. If no arguments are given, the entire contents of the text widget are returned. If any arguments are given, the entire contents of the text widget are deleted and replaced by the argument list.
$text->debug(?boolean?)
If boolean is specified, then it must have one of the true or false values accepted by Tcl_GetBoolean. If the value is a true one then internal consistency checks will be turned on in the B-tree code associated with text widgets. If boolean has a false value then the debugging checks will be turned off. In either case the command returns an empty string. If boolean is not specified then the command returns on or off to indicate whether or not debugging is turned on. There is a single debugging switch shared by all text widgets: turning debugging on or off in any widget turns it on or off for all widgets. For widgets with large amounts of text, the consistency checks may cause a noticeable slow-down.
$text->delete(index1, ?index2?)
Delete a range of characters from the text. If both index1 and index2 are specified, then delete all the characters starting with the one given by index1 and stopping just before index2 (i.e. the character at index2 is not deleted). If index2 doesn’t specify a position later in the text than index1 then no characters are deleted. If index2 isn’t specified then the single character at index1 is deleted. It is not allowable to delete characters in a way that would leave the text without a newline as the last character. The command returns an empty string. If more indices are given, multiple ranges of text will be deleted. All indices are first checked for validity before any deletions are made. They are sorted and the text is removed from the last range to the first range to deleted text does not cause a undesired index shifting side-effects. If multiple ranges with the same start index are given, then the longest range is used. If overlapping ranges are given, then they will be merged into spans that do not cause deletion of text outside the given ranges due to text shifted during deletion.
$text->deleteSelected
Delete the currently selected text.
$text->deleteTextTaggedWith(tag)
Delete the text tagged with the tag parameter.
$text->deleteToEndofLine
Delete from the insert mark location to the end of line.
$text->dlineinfo(index)
Returns a list with five elements describing the area occupied by the display line containing index. The first two elements of the list give the x and y coordinates of the upper-left corner of the area occupied by the line, the third and fourth elements give the width and height of the area, and the fifth element gives the position of the baseline for the line, measured down from the top of the area. All of this information is measured in pixels. If the current wrap mode is none and the line extends beyond the boundaries of the window, the area returned reflects the entire area of the line, including the portions that are out of the window. If the line is shorter than the full width of the window then the area returned reflects just the portion of the line that is occupied by characters and embedded windows. If the display line containing index is not visible on the screen then the return value is an empty list.
$text->dump(?switches?, index1, ?index2?)
Return the contents of the text widget from index1 up to, but not including index2, including the text and information about marks, tags, and embedded windows. If index2 is not specified, then it defaults to one character past index1. The information is returned in the following format: key1 value1 index1 key2 value2 index2 … The possible key values are text, mark, tagon, tagoff, and $text
. The corresponding value is the text, mark name, tag name, or window name. The index information is the index of the start of the text, the mark, the tag transition, or the window. One or more of the following switches (or abbreviations thereof) may be specified to control the dump:
-all
Return information about all elements: text, marks, tags, and windows. This is the default.
-command => callback
Instead of returning the information as the result of the dump operation, invoke the callback on each element of the text widget within the range. The callback has three arguments appended to it before it is evaluated: the key, value, and index.
-mark
Include information about marks in the dump results.
-tag
Include information about tag transitions in the dump results. Tag information is returned as tagon and tagoff elements that indicate the begin and end of each range of each tag, respectively.
-text
Include information about text in the dump results. The value is the text up to the next element or the end of range indicated by index2. A text element does not span newlines. A multi-line block of text that contains no marks or tag transitions will still be dumped as a set of text seqments that each end with a newline. The newline is part of the value.
-window
Include information about embedded windows in the dump results. The value of a window is its Tk pathname, unless the window has not been created yet. (It must have a create script.) In this case an empty string is returned, and you must query the window by its index position to get more information.
$text->edit( option, ?arg, arg …? );
This command controls the undo mechanism and the modified flag. The exact behavior of the command depends on the option argument that follows the edit argument. The following forms of the command are currently supported:
$text->editModified( ?boolean? );
If boolean is not specified, returns the modified flag of the widget. The insert, delete, edit undo and edit redo commands or the user can set or clear the modified flag. If boolean is specified, sets the modified flag of the widget to boolean.
$text->editRedo;
(Not implemented, use TextUndo.) When the -undo option is true, reapplies the last undone edits provided no other edits were done since then. Generates an error when the redo stack is empty. Does nothing when the -undo option is false.
$text->editReset;
(Not implemented, use TextUndo.) Clears the undo and redo stacks.
$text->editSeparator;
(Not implemented, use TextUndo.) Inserts a separator (boundary) on the undo stack. Does nothing when the -undo option is false.
$text->editUndo;
(Not implemented, use TextUndo.) Undoes the last edit action when the -undo option is true. An edit action is defined as all the insert and delete commands that are recorded on the undo stack in between two separators. Generates an error when the undo stack is empty. Does nothing when the -undo option is false.
$text->FindAll(mode, case, pattern)
Removes any current selections and then performs a global text search. All matches are tagged with the sel tag. mode can be be -exact or -regexp. See the search command for more information case can be -nocase or -case. See the search command for more information pattern is an exact string to match if mode is -exact or a regular expression if the match mode is -regexp.
$text->FindAndReplaceAll(mode, case, find, replace)
Same as the FindAll method, however additionally substitutes the matched text with the characters replace.
$text->FindAndReplacePopUp
Creates a find-and-replace popup window if one does not already exist. If there is currently selected text, then the ‘find’ field will be ‘pre-filled’ with the selection.
$text->FindNext(direction, mode, case, pattern)
Removes any current selections and then performs a forward or reverse text search. All matches are tagged with the sel tag. direction can be -forwards or -backwards. mode, case and pattern are as for the FindAll method.
$text->FindPopUp
Creates a find popup, if one does not yet exist. If there is currently selected text, then the ‘find’ field will be ‘pre-filled’ with the selection.
$text->FindSelectionNext
Gets the currently selected text and removes all selections. It then finds the next exact, case-sensitive string that matches in a forward direction and selects the text and makes the new selection visible.
$text->FindSelectionPrevious
Gets the currently selected text and removes all selections. It then finds the next exact, case-sensitive string that matches in a reverse direction and selects the text and makes the new selection visible.
$text->get(index1, ?index2?)
Return a range of characters from the text. The return value will be all the characters in the text starting with the one whose index is index1 and ending just before the one whose index is index2 (the character at index2 will not be returned). If index2 is omitted then the single character at index1 is returned. If there are no characters in the specified range (e.g. index1 is past the end of the file or index2 is less than or equal to index1) then an empty string is returned. If the specified range contains embedded windows, no information about them is included in the returned string. If multiple index pairs are given, multiple ranges of text will be returned in a list. Invalid ranges will not be represented with empty strings in the list. The ranges are returned in the order passed to get.
$text->getSelected
Return the currently selected text.
$text->GetTextTaggedWith(tag)
Return the text tagged with the tag parameter.
$text->GotoLineNumber(line_number)
Set the insert mark to line_number and ensures the line is visible.
$text->GotoLineNumberPopUp(line_number)
Displays a popup, pre-filling it with selected numeric text (if any), or the line number from GotoLineNumber (if any).
$text->image(option, ?arg, arg, …?)
$text->imageOption(?arg, arg, …?)
This method is used to manipulate embedded images. The behavior of the method depends on the option argument that follows the image prefix. The following forms of the methods are currently supported:
$text->imageCget(index, option)
Returns the value of a configuration option for an embedded image. Index identifies the embedded image, and option specifies a particular configuration option, which must be one of the ones listed in “EMBEDDED IMAGES”.$text->imageConfigure(index, ?option, value, …?)
Query or modify the configuration options for an embedded image. If no option is specified, returns a list describing all of the available options for the embedded image at index (see Tk::options for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. See “EMBEDDED IMAGES” for information on the options that are supported.$text->imageCreate(index, ?option, value, …?)
This command creates a new image annotation, which will appear in the text at the position given by index. Any number of option-value pairs may be specified to configure the annotation. Returns a unique identifier that may be used as an index to refer to this image. See “EMBEDDED IMAGES” for information on the options that are supported, and a description of the identifier returned.$text->imageNames
Returns a list whose elements are the names of all image instances currently embedded in$text
.
$text->index(index)
Returns the position corresponding to index in the form line.char where line is the line number and char is the character number. Index may have any of the forms described under “INDICES” above.
$text->insert(index, chars, ?tagList, chars, tagList, …?)
Inserts all of the chars arguments just before the character at index. If index refers to the end of the text (the character after the last newline) then the new text is inserted just before the last newline instead. If there is a single chars argument and no tagList, then the new text will receive any tags that are present on both the character before and the character after the insertion point; if a tag is present on only one of these characters then it will not be applied to the new text. If tagList is specified then it consists of a list of tag names; the new characters will receive all of the tags in this list and no others, regardless of the tags present around the insertion point. If multiple chars-tagList argument pairs are present, they produce the same effect as if a separate insert widget command had been issued for each pair, in order. The last tagList argument may be omitted.
$text->Insert(string)
Do NOT confuse this with the lower-case insert method. Insert string at the point of the insertion cursor. If there is a selection in the text, and it covers the point of the insertion cursor, then it deletes the selection before inserting.
$text->InsertKeypress(character)
Inserts character at the insert mark. If in overstrike mode, it firsts deletes the character at the insert mark.
$text->InsertSelection
Inserts the current selection at the insert mark.
$text->insertTab
Inserts a tab ( ) character at the insert mark.
$text->mark(option, ?arg, arg, …?)
This command is used to manipulate marks. The exact behavior of the command depends on the option argument that follows the mark argument. The following forms of the command are currently supported:
$text->markGravity(markName, ?direction?)
If direction is not specified, returns left or right to indicate which of its adjacent characters markName is attached to. If direction is specified, it must be left or right; the gravity of markName is set to the given value.
$text->markNames
Returns a list whose elements are the names of all the marks that are currently set.
$text->markNext(index)
Returns the name of the next mark at or after index. If index is specified in numerical form, then the search for the next mark begins at that index. If index is the name of a mark, then the search for the next mark begins immediately after that mark. This can still return a mark at the same position if there are multiple marks at the same index. These semantics mean that the mark next operation can be used to step through all the marks in a text widget in the same order as the mark information returned by the dump operation. If a mark has been set to the special end index, then it appears to be after end with respect to the mark next operation. An empty string is returned if there are no marks after index.
$text->markPrevious(index)
Returns the name of the mark at or before index. If index is specified in numerical form, then the search for the previous mark begins with the character just before that index. If index is the name of a mark, then the search for the next mark begins immediately before that mark. This can still return a mark at the same position if there are multiple marks at the same index. These semantics mean that the mark previous operation can be used to step through all the marks in a text widget in the reverse order as the mark information returned by the dump operation. An empty string is returned if there are no marks before index.
$text->markSet(markName, index)
Sets the mark named markName to a position just before the character at index. If markName already exists, it is moved from its old position; if it doesn’t exist, a new mark is created. This command returns an empty string.
$text->markUnset(markName?, markName, markName, …?)
Remove the mark corresponding to each of the markName arguments. The removed marks will not be usable in indices and will not be returned by future calls to ``$text
->markNames’’. This command returns an empty string.
$text->markExists(markname)
Returns true if markname exists - false otherwise.
$text->menu(?menu?)
If menu reference is given as an argument, then the text widget menu is adjusted to use this new menu. If the menu argument is undef, then this command disables the current text widget menu. If the menu argument is omitted altogether, then the current text widget menu reference is returned.
$text->openLine
Inserts a newline (
) at the insert mark.
$text->OverstrikeMode(?boolean?)
Returns the overstrike mode if boolean is omitted or sets the overstrike mode to boolean. True means overstrike mode is enabled.
$text->PostPopupMenu(x,y)
Creates a popup menu at the specified (x,y) pixel coordinates. The default menu has File, Edit, Search and View menu items which cascade to sub-menus for further commands. There is an implicit <Button-3> binding to this method that posts the menu over the cursor.
$text->ResetAnchor
Sets the selection anchor to whichever end is farthest from the index argument.
$text->scan(option, args) or
$text->scanoption(args)
This method is used to implement scanning on texts. It has two forms, depending on option:
$text->scanMark(x, y)
Records x and y and the current view in the text window, for use in conjunction with later scanDragto method. Typically this method is associated with a mouse button press in the widget. It returns an empty string.$text->scanDragto(x, y)
This command computes the difference between its x and y arguments and the x and y arguments to the last scanMark method for the widget. It then adjusts the view by 10 times the difference in coordinates. This command is typically associated with mouse motion events in the widget, to produce the effect of dragging the text at high speed through the window. The return value is an empty string.
$text->search(?switches,? pattern, index, ?stopIndex?)
Searches the text in $text
starting at index for a range of characters that matches pattern. If a match is found, the index of the first character in the match is returned as result; otherwise an empty string is returned. One or more of the following switches (or abbreviations thereof) may be specified to control the search:
-forwards
The search will proceed forward through the text, finding the first matching range starting at or after the position given by index. This is the default.
-backwards
The search will proceed backward through the text, finding the matching range closest to index whose first character is before index.
-exact
Use exact matching: the characters in the matching range must be identical to those in pattern. This is the default.
-regexp
Treat pattern as a regular expression and match it against the text using the rules for regular expressions (see the regexp command for details).
-nocase
Ignore case differences between the pattern and the text.
-count varName
The argument following -count gives the name of a variable; if a match is found, the number of characters in the matching range will be stored in the variable.
-hidden
Find hidden text as well. By default only displayed text is found.
–
This switch has no effect except to terminate the list of switches: the next argument will be treated as pattern even if it starts with -.
The matching range must be entirely within a single line of text. For regular expression matching the newlines are removed from the ends of the lines before matching: use the $ feature in regular expressions to match the end of a line. For exact matching the newlines are retained. If stopIndex is specified, the search stops at that index: for forward searches, no match at or after stopIndex will be considered; for backward searches, no match earlier in the text than stopIndex will be considered. If stopIndex is omitted, the entire text will be searched: when the beginning or end of the text is reached, the search continues at the other end until the starting location is reached again; if stopIndex is specified, no wrap-around will occur.
$text->see(index)
Adjusts the view in the window so that the character given by index is completely visible. If index is already visible then the command does nothing. If index is a short distance out of view, the command adjusts the view just enough to make index visible at the edge of the window. If index is far out of view, then the command centers index in the window.
$text->selectAll
Selects all the text in the widget.
$text->selectLine
Selects the line with the insert mark.
$text->selectWord
Selects the word with the insert mark.
$text->SetCursor(position)
Moves the insert mark to position.
$text->tag(option, ?arg, arg, …?)
This command is used to manipulate tags. The exact behavior of the command depends on the option argument that follows the tag argument. The following forms of the command are currently supported:
$text->tagAdd(tagName, index1, ?index2, index1, index2, …?)
Associate the tag tagName with all of the characters starting with index1 and ending just before index2 (the character at index2 isn’t tagged). A single command may contain any number of index1-index2 pairs. If the last index2 is omitted then the single character at index1 is tagged. If there are no characters in the specified range (e.g. index1 is past the end of the file or index2 is less than or equal to index1) then the command has no effect.
$text->tagBind(tagName, ?sequence?, ?script?)
This command associates script with the tag given by tagName. Whenever the event sequence given by sequence occurs for a character that has been tagged with tagName, the script will be invoked. This method is similar to the bind command except that it operates on characters in a text rather than entire widgets. See the Tk::bind documentation for complete details on the syntax of sequence and the substitutions performed on script before invoking it. If all arguments are specified then a new binding is created, replacing any existing binding for the same sequence and tagName (if the first character of script is ``+’’ then script augments an existing binding rather than replacing it). In this case the return value is an empty string. If script is omitted then the command returns the script associated with tagName and sequence (an error occurs if there is no such binding). If both script and sequence are omitted then the command returns a list of all the sequences for which bindings have been defined for tagName. The only events for which bindings may be specified are those related to the mouse and keyboard (such as Enter, Leave, ButtonPress, Motion, and KeyPress) or virtual events. Event bindings for a text widget use the current mark described under “MARKS” above. An Enter event triggers for a tag when the tag first becomes present on the current character, and a Leave event triggers for a tag when it ceases to be present on the current character. Enter and Leave events can happen either because the current mark moved or because the character at that position changed. Note that these events are different than Enter and Leave events for windows. Mouse and keyboard events are directed to the current character. If a virtual event is used in a binding, that binding can trigger only if the virtual event is defined by an underlying mouse-related or keyboard-related event. It is possible for the current character to have multiple tags, and for each of them to have a binding for a particular event sequence. When this occurs, one binding is invoked for each tag, in order from lowest-priority to highest priority. If there are multiple matching bindings for a single tag, then the most specific binding is chosen (see the the documentation for the bind command for details). continue and break commands within binding scripts are processed in the same way as for bindings created with the bind command. If bindings are created for the widget as a whole using the bind command, then those bindings will supplement the tag bindings. The tag bindings will be invoked first, followed by bindings for the window as a whole.
$text->tagCget(tagName, option)
This command returns the current value of the option named option associated with the tag given by tagName. Option may have any of the values accepted by the tag configure method.
$text->tagConfigure(tagName, ?option?, ?value?, ?option, value, …?)
This command is similar to the configure method except that it modifies options associated with the tag given by tagName instead of modifying options for the overall text widget. If no option is specified, the command returns a list describing all of the available options for tagName (see Tk::options for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s) in tagName; in this case the command returns an empty string. See “TAGS” above for details on the options available for tags.
$text->tagDelete(tagName, ?tagName, …?)
Deletes all tag information for each of the tagName arguments. The command removes the tags from all characters in the file and also deletes any other information associated with the tags, such as bindings and display information. The command returns an empty string.
$text->tagLower(tagName?, belowThis?)
Changes the priority of tag tagName so that it is just lower in priority than the tag whose name is belowThis. If belowThis is omitted, then tagName’s priority is changed to make it lowest priority of all tags.
$text->tagNames(?index?)
Returns a list whose elements are the names of all the tags that are active at the character position given by index. If index is omitted, then the return value will describe all of the tags that exist for the text (this includes all tags that have been named in a ``$text
->tag’’ widget command but haven’t been deleted by a ``$text
->tagDelete’’ method, even if no characters are currently marked with the tag). The list will be sorted in order from lowest priority to highest priority.
$text->tagNextrange(tagName, index1, ?index2?)
This command searches the text for a range of characters tagged with tagName where the first character of the range is no earlier than the character at index1 and no later than the character just before index2 (a range starting at index2 will not be considered). If several matching ranges exist, the first one is chosen. The command’s return value is a list containing two elements, which are the index of the first character of the range and the index of the character just after the last one in the range. If no matching range is found then the return value is an empty string. If index2 is not given then it defaults to the end of the text.
$text->tagPrevrange(tagName, index1, ?index2?)
This command searches the text for a range of characters tagged with tagName where the first character of the range is before the character at index1 and no earlier than the character at index2 (a range starting at index2 will be considered). If several matching ranges exist, the one closest to index1 is chosen. The command’s return value is a list containing two elements, which are the index of the first character of the range and the index of the character just after the last one in the range. If no matching range is found then the return value is an empty string. If index2 is not given then it defaults to the beginning of the text.
$text->tagRaise(tagName, ?aboveThis?)
Changes the priority of tag tagName so that it is just higher in priority than the tag whose name is aboveThis. If aboveThis is omitted, then tagName’s priority is changed to make it highest priority of all tags.
$text->tagRanges(tagName)
Returns a list describing all of the ranges of text that have been tagged with tagName. The first two elements of the list describe the first tagged range in the text, the next two elements describe the second range, and so on. The first element of each pair contains the index of the first character of the range, and the second element of the pair contains the index of the character just after the last one in the range. If there are no characters tagged with tag then an empty string is returned.
$text->tagRemove(tagName, index1, ?index2, index1, index2, …?)
Remove the tag tagName from all of the characters starting at index1 and ending just before index2 (the character at index2 isn’t affected). A single command may contain any number of index1-index2 pairs. If the last index2 is omitted then the single character at index1 is tagged. If there are no characters in the specified range (e.g. index1 is past the end of the file or index2 is less than or equal to index1) then the command has no effect. This command returns an empty string.
$text->ToggleInsertMode
Toggles the current overstrike mode.
$text->unselectAll
Unselects all the text in the widget.
$text->WhatLineNumberPopup
Creates a popup that displays the current line number of the insert mark.
$text->widget(option?, arg, arg, …?)
$text->widgetOption(?arg, arg, …?)
This method is used to manipulate embedded windows. The behavior of the method depends on the option argument that follows the window argument. The following forms of the method are currently supported:
$text->windowCget(index, option)
Returns the value of a configuration option for an embedded window. Index identifies the embedded window, and option specifies a particular configuration option, which must be one of the ones listed in “EMBEDDED WINDOWS” above.$text->windowConfigure(index?, option, value, …?)
Query or modify the configuration options for an embedded window. If no option is specified, returns a list describing all of the available options for the embedded window at index (see Tk::options for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. See “EMBEDDED WINDOWS” above for information on the options that are supported.$text->windowCreate(index?, option, value, …?)
This command creates a new window annotation, which will appear in the text at the position given by index. Any number of option-value pairs may be specified to configure the annotation. See “EMBEDDED WINDOWS” above for information on the options that are supported. Returns an empty string.$text->windowNames
Returns a list whose elements are the names of all windows currently embedded in$text
.
$text->xview(option, args)
This command is used to query and change the horizontal position of the text in the widget’s window. It can take any of the following forms:
$text->xview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the portion of the document’s horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the text is off-screen to the left, the middle 40% is visible in the window, and 40% of the text is off-screen to the right. The fractions refer only to the lines that are actually visible in the window: if the lines in the window are all very short, so that they are entirely visible, the returned fractions will be 0 and 1, even if there are other lines in the text that are much wider than the window. These are the same values passed to scrollbars via the -xscrollcommand option.
$text->xviewMoveto(fraction)
Adjusts the view in the window so that fraction of the horizontal span of the text is off-screen to the left. Fraction is a fraction between 0 and 1.
$text->xviewScroll(number, what)
This command shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number average-width characters on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible.
$text->yview(?args?)
This command is used to query and change the vertical position of the text in the widget’s window. It can take any of the following forms:
$text->yview
Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the first character in the top line in the window, relative to the text as a whole (0.5 means it is halfway through the text, for example). The second element gives the position of the character just after the last one in the bottom line of the window, relative to the text as a whole. These are the same values passed to scrollbars via the -yscrollcommand option.
$text->yviewMoveto(fraction)
Adjusts the view in the window so that the character given by fraction appears on the top line of the window. Fraction is a fraction between 0 and 1; 0 indicates the first character in the text, 0.33 indicates the character one-third the way through the text, and so on.
$text->yviewScroll(number, what)
This command adjust the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages. If what is units, the view adjusts up or down by number lines on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then earlier positions in the text become visible; if it is positive then later positions in the text become visible.
$text->yview(?-pickplace,? index)
Changes the view in the $text
’s window to make index visible. If the -pickplace option isn’t specified then index will appear at the top of the window. If -pickplace is specified then the widget chooses where index appears in the window:
[1]
If index is already visible somewhere in the window then the command does nothing.
[2]
If index is only a few lines off-screen above the window then it will be positioned at the top of the window.
[3]
If index is only a few lines off-screen below the window then it will be positioned at the bottom of the window.
[4]
Otherwise, index will be centered in the window.
The -pickplace option has been obsoleted by the see widget command (see handles both x- and y-motion to make a location visible, whereas -pickplace only handles motion in y).
$text->yview(number)
This command makes the first character on the line after the one given by number visible at the top of the window. Number must be an integer. This command used to be used for scrolling, but now it is obsolete.
BINDINGS
Tk automatically creates class bindings for texts that give them the following default behavior. In the descriptions below, ``word’’ refers to a contiguous group of letters, digits, or ``_’’ characters, or any single character other than these.
[1]
Clicking mouse button 1 positions the insertion cursor just before the character underneath the mouse cursor, sets the input focus to this widget, and clears any selection in the widget. Dragging with mouse button 1 strokes out a selection between the insertion cursor and the character under the mouse.
[2]
Double-clicking with mouse button 1 selects the word under the mouse and positions the insertion cursor at the beginning of the word. Dragging after a double click will stroke out a selection consisting of whole words.
[3]
Triple-clicking with mouse button 1 selects the line under the mouse and positions the insertion cursor at the beginning of the line. Dragging after a triple click will stroke out a selection consisting of whole lines.
[4]
The ends of the selection can be adjusted by dragging with mouse button 1 while the Shift key is down; this will adjust the end of the selection that was nearest to the mouse cursor when button 1 was pressed. If the button is double-clicked before dragging then the selection will be adjusted in units of whole words; if it is triple-clicked then the selection will be adjusted in units of whole lines.
[5]
Clicking mouse button 1 with the Control key down will reposition the insertion cursor without affecting the selection.
[6]
If any normal printing characters are typed, they are inserted at the point of the insertion cursor.
[7]
The view in the widget can be adjusted by dragging with mouse button 2. If mouse button 2 is clicked without moving the mouse, the selection is copied into the text at the position of the mouse cursor. The Insert key also inserts the selection, but at the position of the insertion cursor.
[8]
If the mouse is dragged out of the widget while button 1 is pressed, the entry will automatically scroll to make more text visible (if there is more text off-screen on the side where the mouse left the window).
[9]
The Left and Right keys move the insertion cursor one character to the left or right; they also clear any selection in the text. If Left or Right is typed with the Shift key down, then the insertion cursor moves and the selection is extended to include the new character. Control-Left and Control-Right move the insertion cursor by words, and Control-Shift-Left and Control-Shift-Right move the insertion cursor by words and also extend the selection. Control-b and Control-f behave the same as Left and Right, respectively. Meta-b and Meta-f behave the same as Control-Left and Control-Right, respectively.
[10]
The Up and Down keys move the insertion cursor one line up or down and clear any selection in the text. If Up or Right is typed with the Shift key down, then the insertion cursor moves and the selection is extended to include the new character. Control-Up and Control-Down move the insertion cursor by paragraphs (groups of lines separated by blank lines), and Control-Shift-Up and Control-Shift-Down move the insertion cursor by paragraphs and also extend the selection. Control-p and Control-n behave the same as Up and Down, respectively.
[11]
The Next and Prior keys move the insertion cursor forward or backwards by one screenful and clear any selection in the text. If the Shift key is held down while Next or Prior is typed, then the selection is extended to include the new character. Control-v moves the view down one screenful without moving the insertion cursor or adjusting the selection.
[12]
Control-Next and Control-Prior scroll the view right or left by one page without moving the insertion cursor or affecting the selection.
[13]
Home and Control-a move the insertion cursor to the beginning of its line and clear any selection in the widget. Shift-Home moves the insertion cursor to the beginning of the line and also extends the selection to that point.
[14]
End and Control-e move the insertion cursor to the end of the line and clear any selection in the widget. Shift-End moves the cursor to the end of the line and extends the selection to that point.
[15]
Control-Home and Meta-< move the insertion cursor to the beginning of the text and clear any selection in the widget. Control-Shift-Home moves the insertion cursor to the beginning of the text and also extends the selection to that point.
[16]
Control-End and Meta-> move the insertion cursor to the end of the text and clear any selection in the widget. Control-Shift-End moves the cursor to the end of the text and extends the selection to that point.
[17]
The Select key and Control-Space set the selection anchor to the position of the insertion cursor. They don’t affect the current selection. Shift-Select and Control-Shift-Space adjust the selection to the current position of the insertion cursor, selecting from the anchor to the insertion cursor if there was not any selection previously.
[18]
Control-/ selects the entire contents of the widget.
[19]
Control-\ clears any selection in the widget.
[20]
The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the selection in the widget to the clipboard, if there is a selection.
[21]
The F20 key (labelled Cut on many Sun workstations) or Control-w copies the selection in the widget to the clipboard and deletes the selection. If there is no selection in the widget then these keys have no effect.
[22]
The F18 key (labelled Paste on many Sun workstations) or Control-y inserts the contents of the clipboard at the position of the insertion cursor.
[23]
The Delete key deletes the selection, if there is one in the widget. If there is no selection, it deletes the character to the right of the insertion cursor.
[24]
Backspace and Control-h delete the selection, if there is one in the widget. If there is no selection, they delete the character to the left of the insertion cursor.
[25]
Control-d deletes the character to the right of the insertion cursor.
[26]
Meta-d deletes the word to the right of the insertion cursor.
[27]
Control-k deletes from the insertion cursor to the end of its line; if the insertion cursor is already at the end of a line, then Control-k deletes the newline character.
[28]
Control-o opens a new line by inserting a newline character in front of the insertion cursor without moving the insertion cursor.
[29]
Meta-backspace and Meta-Delete delete the word to the left of the insertion cursor.
[30]
Control-x deletes whatever is selected in the text widget.
[31]
Control-t reverses the order of the two characters to the right of the insertion cursor.
[32]
Control-z (and Control-underscore on UNIX when tk_strictMotif is true) undoes the last edit action if the -undo option is true. Does nothing otherwise.
[33]
Control-Z (or Control-y on Windows) reapplies the last undone edit action if the -undo option is true. Does nothing otherwise.
If the widget is disabled using the -state option, then its view can still be adjusted and text can still be selected, but no insertion cursor will be displayed and no text modifications will take place.
The behavior of texts can be changed by defining new bindings for individual widgets or by redefining the class bindings.
TIED INTERFACE
The Perl/Tk Text widget also has built-in TIEHANDLE methods for print and printf statements. This means you can print to file handles tied to a Text widget, and the tied methods automatically insert the print statement’s arguments into the Text widget.
For example:
#!/usr/local/bin/perl -w use POSIX acos; use Tk; use strict; my $mw = MainWindow->new; my $text = $mw->Text(qw/-width 40 -height 10/)->pack; tie *STDOUT, ref $text, $text; print “Hello Text World! “; printf “pi ~= %1.5f”, acos(-1.0); MainLoop;
To tie a scrolled Text widget, use the Subwidget method to get to the “real” widget:
my $text = $mw->Scrolled(Text)->pack; tie *STDOUT, Tk::Text, $text->Subwidget(scrolled);
PERFORMANCE ISSUES
Text widgets should run efficiently under a variety of conditions. The text widget uses about 2-3 bytes of main memory for each byte of text, so texts containing a megabyte or more should be practical on most workstations. Text is represented internally with a modified B-tree structure that makes operations relatively efficient even with large texts. Tags are included in the B-tree structure in a way that allows tags to span large ranges or have many disjoint smaller ranges without loss of efficiency. Marks are also implemented in a way that allows large numbers of marks. In most cases it is fine to have large numbers of unique tags, or a tag that has many distinct ranges.
One performance problem can arise if you have hundreds or thousands of different tags that all have the following characteristics: the first and last ranges of each tag are near the beginning and end of the text, respectively, or a single tag range covers most of the text widget. The cost of adding and deleting tags like this is proportional to the number of other tags with the same properties. In contrast, there is no problem with having thousands of distinct tags if their overall ranges are localized and spread uniformly throughout the text.
Very long text lines can be expensive, especially if they have many marks and tags within them.
The display line with the insert cursor is redrawn each time the cursor blinks, which causes a steady stream of graphics traffic. Set the -insertofftime option to 0 avoid this.
SEE ALSO
Tk::ROText Tk::TextUndo
KEYWORDS
text, widget
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
93 - Linux cli command Net_DNS_RR_PXpm
NAME 🖥️ Net_DNS_RR_PXpm 🖥️
DNS PX resource record
SYNOPSIS
use Net::DNS; $rr = Net::DNS::RR->new(name PX preference map822 mapx400);
DESCRIPTION
Class for DNS X.400 Mail Mapping Information (PX) resource records.
METHODS
The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.
Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.
preference
$preference = $rr->preference; $rr->preference( $preference );
A 16 bit integer which specifies the preference given to this RR among others at the same owner. Lower values are preferred.
map822
$map822 = $rr->map822; $rr->map822( $map822 );
A domain name element containing <rfc822-domain>, the RFC822 part of the MIXER Conformant Global Address Mapping.
mapx400
$mapx400 = $rr->mapx400; $rr->mapx400( $mapx400 );
A <domain-name> element containing the value of <x400-in-domain-syntax> derived from the X.400 part of the MIXER Conformant Global Address Mapping.
COPYRIGHT
Copyright (c)1997 Michael Fuhr.
All rights reserved.
Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.
LICENSE
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SEE ALSO
perl Net::DNS Net::DNS::RR RFC2163 <https://tools.ietf.org/html/rfc2163>
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
94 - Linux cli command pthread_kill_other_threads_np
NAME 🖥️ pthread_kill_other_threads_np 🖥️
terminate all other threads in process
LIBRARY
POSIX threads library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h>
void pthread_kill_other_threads_np(void);
DESCRIPTION
pthread_kill_other_threads_np() has an effect only in the LinuxThreads threading implementation. On that implementation, calling this function causes the immediate termination of all threads in the application, except the calling thread. The cancelation state and cancelation type of the to-be-terminated threads are ignored, and the cleanup handlers are not called in those threads.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
pthread_kill_other_threads_np() | Thread safety | MT-Safe |
VERSIONS
In the NPTL threading implementation, pthread_kill_other_threads_np() exists, but does nothing. (Nothing needs to be done, because the implementation does the right thing during an execve(2).)
STANDARDS
GNU; hence the suffix “_np” (nonportable) in the name.
HISTORY
glibc 2.0
NOTES
pthread_kill_other_threads_np() is intended to be called just before a thread calls execve(2) or a similar function. This function is designed to address a limitation in the obsolete LinuxThreads implementation whereby the other threads of an application are not automatically terminated (as POSIX.1-2001 requires) during execve(2).
SEE ALSO
execve(2), pthread_cancel(3), pthread_setcancelstate(3), pthread_setcanceltype(3), pthreads(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
95 - Linux cli command tdestroy
NAME 🖥️ tdestroy 🖥️
manage a binary search tree
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <search.h>
typedef enum { preorder, postorder, endorder, leaf } VISIT;
void *tsearch(const void *key, void **rootp,
int (*compar)(const void *, const void *));
void *tfind(const void *key, void *const *rootp,
int (*compar)(const void *, const void *));
void *tdelete(const void *restrict key, void **restrict rootp,
int (*compar)(const void *, const void *));
void twalk(const void *root,
void (*action)(const void *nodep, VISIT which,
int depth));
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
void twalk_r(const void *root,
void (*action)(const void *nodep, VISIT which,
void *closure),
void *closure);
void tdestroy(void *root, void (*free_node)(void *nodep));
DESCRIPTION
tsearch(), tfind(), twalk(), and tdelete() manage a binary search tree. They are generalized from Knuth (6.2.2) Algorithm T. The first field in each node of the tree is a pointer to the corresponding data item. (The calling program must store the actual data.) compar points to a comparison routine, which takes pointers to two items. It should return an integer which is negative, zero, or positive, depending on whether the first item is less than, equal to, or greater than the second.
tsearch() searches the tree for an item. key points to the item to be searched for. rootp points to a variable which points to the root of the tree. If the tree is empty, then the variable that rootp points to should be set to NULL. If the item is found in the tree, then tsearch() returns a pointer to the corresponding tree node. (In other words, tsearch() returns a pointer to a pointer to the data item.) If the item is not found, then tsearch() adds it, and returns a pointer to the corresponding tree node.
tfind() is like tsearch(), except that if the item is not found, then tfind() returns NULL.
tdelete() deletes an item from the tree. Its arguments are the same as for tsearch().
twalk() performs depth-first, left-to-right traversal of a binary tree. root points to the starting node for the traversal. If that node is not the root, then only part of the tree will be visited. twalk() calls the user function action each time a node is visited (that is, three times for an internal node, and once for a leaf). action, in turn, takes three arguments. The first argument is a pointer to the node being visited. The structure of the node is unspecified, but it is possible to cast the pointer to a pointer-to-pointer-to-element in order to access the element stored within the node. The application must not modify the structure pointed to by this argument. The second argument is an integer which takes one of the values preorder, postorder, or endorder depending on whether this is the first, second, or third visit to the internal node, or the value leaf if this is the single visit to a leaf node. (These symbols are defined in <search.h>.) The third argument is the depth of the node; the root node has depth zero.
(More commonly, preorder, postorder, and endorder are known as preorder, inorder, and postorder: before visiting the children, after the first and before the second, and after visiting the children. Thus, the choice of name postorder is rather confusing.)
twalk_r() is similar to twalk(), but instead of the depth argument, the closure argument pointer is passed to each invocation of the action callback, unchanged. This pointer can be used to pass information to and from the callback function in a thread-safe fashion, without resorting to global variables.
tdestroy() removes the whole tree pointed to by root, freeing all resources allocated by the tsearch() function. For the data in each tree node the function free_node is called. The pointer to the data is passed as the argument to the function. If no such work is necessary, free_node must point to a function doing nothing.
RETURN VALUE
tsearch() returns a pointer to a matching node in the tree, or to the newly added node, or NULL if there was insufficient memory to add the item. tfind() returns a pointer to the node, or NULL if no match is found. If there are multiple items that match the key, the item whose node is returned is unspecified.
tdelete() returns a pointer to the parent of the node deleted, or NULL if the item was not found. If the deleted node was the root node, tdelete() returns a dangling pointer that must not be accessed.
tsearch(), tfind(), and tdelete() also return NULL if rootp was NULL on entry.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
tsearch(), tfind(), tdelete() | Thread safety | MT-Safe race:rootp |
twalk() | Thread safety | MT-Safe race:root |
twalk_r() | Thread safety | MT-Safe race:root |
tdestroy() | Thread safety | MT-Safe |
STANDARDS
tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2008.
tdestroy()
twalk_r()
GNU.
HISTORY
tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2001, POSIX.1-2008, SVr4.
twalk_r()
glibc 2.30.
NOTES
twalk() takes a pointer to the root, while the other functions take a pointer to a variable which points to the root.
tdelete() frees the memory required for the node in the tree. The user is responsible for freeing the memory for the corresponding data.
The example program depends on the fact that twalk() makes no further reference to a node after calling the user function with argument “endorder” or “leaf”. This works with the GNU library implementation, but is not in the System V documentation.
EXAMPLES
The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order.
#define _GNU_SOURCE /* Expose declaration of tdestroy() */
#include <search.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static void *root = NULL;
static void *
xmalloc(size_t n)
{
void *p;
p = malloc(n);
if (p)
return p;
fprintf(stderr, "insufficient memory
“); exit(EXIT_FAILURE); } static int compare(const void *pa, const void pb) { if ((int *) pa < *(int ) pb) return -1; if ((int *) pa > *(int *) pb) return 1; return 0; } static void action(const void *nodep, VISIT which, int depth) { int *datap; switch (which) { case preorder: break; case postorder: datap = *(int **) nodep; printf("%6d “, *datap); break; case endorder: break; case leaf: datap = *(int **) nodep; printf("%6d “, *datap); break; } } int main(void) { int *ptr; int **val; srand(time(NULL)); for (unsigned int i = 0; i < 12; i++) { ptr = xmalloc(sizeof(*ptr)); *ptr = rand() & 0xff; val = tsearch(ptr, &root, compare); if (val == NULL) exit(EXIT_FAILURE); if (*val != ptr) free(ptr); } twalk(root, action); tdestroy(root, free); exit(EXIT_SUCCESS); }
SEE ALSO
bsearch(3), hsearch(3), lsearch(3), qsort(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
96 - Linux cli command SLIST_INIT
NAME 🖥️ SLIST_INIT 🖥️
implementation of a singly linked list
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
SLIST_ENTRY NAME);
DESCRIPTION
These macros define and operate on singly linked lists.
In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().
Creation
A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:
SLIST_HEAD(HEADNAME, TYPE) head;
where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:
struct HEADNAME *headp;
(The names head and headp are user selectable.)
SLIST_ENTRY() declares a structure that connects the elements in the list.
SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.
SLIST_INIT() initializes the list referenced by head.
SLIST_EMPTY() evaluates to true if there are no elements in the list.
Insertion
SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.
SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.
Traversal
SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.
SLIST_NEXT() returns the next element in the list.
SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.
Removal
SLIST_REMOVE() removes the element elm from the list.
SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().
RETURN VALUE
SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.
SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.
SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.
STANDARDS
BSD.
HISTORY
4.4BSD.
BUGS
SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.
EXAMPLES
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
int data;
SLIST_ENTRY(entry) entries; /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct slisthead head; /* Singly linked list
head */
SLIST_INIT(&head); /* Initialize the queue */
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
SLIST_INSERT_HEAD(&head, n1, entries);
n2 = malloc(sizeof(struct entry)); /* Insert after */
SLIST_INSERT_AFTER(n1, n2, entries);
SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
free(n2);
n3 = SLIST_FIRST(&head);
SLIST_REMOVE_HEAD(&head, entries); /* Deletion from the head */
free(n3);
for (unsigned int i = 0; i < 5; i++) {
n1 = malloc(sizeof(struct entry));
SLIST_INSERT_HEAD(&head, n1, entries);
n1->data = i;
}
/* Forward traversal */
SLIST_FOREACH(np, &head, entries)
printf("%i
“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }
SEE ALSO
insque(3), queue(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
97 - Linux cli command strcspn
NAME 🖥️ strcspn 🖥️
get length of a prefix substring
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <string.h>
size_t strspn(const char *s, const char *accept);
size_t strcspn(const char *s, const char *reject);
DESCRIPTION
The strspn() function calculates the length (in bytes) of the initial segment of s which consists entirely of bytes in accept.
The strcspn() function calculates the length of the initial segment of s which consists entirely of bytes not in reject.
RETURN VALUE
The strspn() function returns the number of bytes in the initial segment of s which consist only of bytes from accept.
The strcspn() function returns the number of bytes in the initial segment of s which are not in the string reject.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
strspn(), strcspn() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
POSIX.1-2001, C89, SVr4, 4.3BSD.
SEE ALSO
memchr(3), strchr(3), string(3), strpbrk(3), strsep(3), strstr(3), strtok(3), wcscspn(3), wcsspn(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
98 - Linux cli command XtRemoveBlockHook
NAME 🖥️ XtRemoveBlockHook 🖥️
register a block hook procedure
SYNTAX
#include <X11/Intrinsic.h>
XtBlockHookId XtAppAddBlockHook(XtAppContext app_context, XtBlockHookProc proc, XtPointer client_data);
void XtRemoveBlockHook(XtBlockHookId id);
ARGUMENTS
app_context
Specifies the application context.
proc
Specifies the block hook procedure.
num_args
Specifies the application-specific data to be passed to the block hook.
DESCRIPTION
XtAppAddBlockHook registers the specified procedure and returns an identifier for it. The hook is called at any time in the future when the Intrinsics are about to block pending some input.
Block hook procedures are removed automatically and the XtBlockHookId is destroyed when the application context in which they were added is destroyed.
XtRemoveBlockHook removes the specified block hook procedure from the list in which it was registered.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
99 - Linux cli command IO_Wrappm
NAME 🖥️ IO_Wrappm 🖥️
Wrap raw filehandles in the IO::Handle interface
SYNOPSIS
use strict; use warnings; use IO::Wrap; # this is a fairly senseless use case as IO::Handle already does this. my $wrap_fh = IO::Wrap->new(\STDIN); my $line = $wrap_fh->getline(); # Do stuff with any kind of filehandle (including a bare globref), or # any kind of blessed object that responds to a print() message. # already have a globref? a FileHandle? a scalar filehandle name? $wrap_fh = IO::Wrap->new($some_unknown_thing); # At this point, we know we have an IO::Handle-like object! YAY $wrap_fh->print(“Hey there!”);
You can also do this using a convenience wrapper function
use strict; use warnings; use IO::Wrap qw(wraphandle); # this is a fairly senseless use case as IO::Handle already does this. my $wrap_fh = wraphandle(\STDIN); my $line = $wrap_fh->getline(); # Do stuff with any kind of filehandle (including a bare globref), or # any kind of blessed object that responds to a print() message. # already have a globref? a FileHandle? a scalar filehandle name? $wrap_fh = wraphandle($some_unknown_thing); # At this point, we know we have an IO::Handle-like object! YAY $wrap_fh->print(“Hey there!”);
DESCRIPTION
Let’s say you want to write some code which does I/O, but you don’t want to force the caller to provide you with a FileHandle or IO::Handle object. You want them to be able to say:
do_stuff(\STDOUT); do_stuff(STDERR); do_stuff($some_FileHandle_object); do_stuff($some_IO_Handle_object);
And even:
do_stuff($any_object_with_a_print_method);
Sure, one way to do it is to force the caller to use tiehandle()
. But that puts the burden on them. Another way to do it is to use IO::Wrap.
Clearly, when wrapping a raw external filehandle (like \*STDOUT
), I didn’t want to close the file descriptor when the wrapper object is destroyed; the user might not appreciate that! Hence, there’s no DESTROY
method in this class.
When wrapping a FileHandle object, however, I believe that Perl will invoke the FileHandle::DESTROY
when the last reference goes away, so in that case, the filehandle is closed if the wrapped FileHandle really was the last reference to it.
FUNCTIONS
IO::Wrap makes the following functions available.
wraphandle
# wrap a filehandle glob my $fh = wraphandle(\STDIN); # wrap a raw filehandle glob by name $fh = wraphandle(STDIN); # wrap a handle in an object $fh = wraphandle(Class::HANDLE); # wrap a blessed FileHandle object use FileHandle; my $fho = FileHandle->new("/tmp/foo.txt", “r”); $fh = wraphandle($fho); # wrap any other blessed object that shares IO::Handles interface $fh = wraphandle($some_object);
This function is simply a wrapper to the “new” in IO::Wrap constructor method.
METHODS
IO::Wrap implements the following methods.
close
$fh->close();
The close
method will attempt to close the system file descriptor. For a more complete description, read “close” in perlfunc.
fileno
my $int = $fh->fileno();
The fileno
method returns the file descriptor for the wrapped filehandle. See “fileno” in perlfunc for more information.
getline
my $data = $fh->getline();
The getline
method mimics the function by the same name in IO::Handle. It’s like calling my $data = <$fh>;
but only in scalar context.
getlines
my @data = $fh->getlines();
The getlines
method mimics the function by the same name in IO::Handle. It’s like calling my @data = <$fh>;
but only in list context. Calling this method in scalar context will result in a croak.
new
# wrap a filehandle glob my $fh = IO::Wrap->new(\STDIN); # wrap a raw filehandle glob by name $fh = IO::Wrap->new(STDIN); # wrap a handle in an object $fh = IO::Wrap->new(Class::HANDLE); # wrap a blessed FileHandle object use FileHandle; my $fho = FileHandle->new("/tmp/foo.txt", “r”); $fh = IO::Wrap->new($fho); # wrap any other blessed object that shares IO::Handles interface $fh = IO::Wrap->new($some_object);
The new
constructor method takes in a single argument and decides to wrap it or not it based on what it seems to be.
A raw scalar file handle name, like "STDOUT"
or "Class::HANDLE"
can be wrapped, returning an IO::Wrap object instance.
A raw filehandle glob, like \*STDOUT
can also be wrapped, returning an IO::Wrawp object instance.
A blessed FileHandle object can also be wrapped. This is a special case where an IO::Wrap object instance will only be returned in the case that your FileHandle object doesn’t support the read
method.
Also, any other kind of blessed object that conforms to the IO::Handle interface can be passed in. In this case, you just get back that object.
In other words, we only wrap it into an IO::Wrap object when what you’ve supplied doesn’t already conform to the IO::Handle interface.
If you get back an IO::Wrap object, it will obey a basic subset of the IO::
interface. It will do so with object methods, not operators.
CAVEATS
This module does not allow you to wrap filehandle names which are given as strings that lack the package they were opened in. That is, if a user opens FOO in package Foo, they must pass it to you either as \*FOO
or as "Foo::FOO"
. However, "STDIN"
and friends will work just fine.
$fh->print(“Some string”); $fh->print(“more”, " than one", " string");
The print
method will attempt to print a string or list of strings to the filehandle. For a more complete description, read “print” in perlfunc.
read
my $buffer; # try to read 30 chars into the buffer starting at the # current cursor position. my $num_chars_read = $fh->read($buffer, 30);
The read method attempts to read a number of characters, starting at the filehandle’s current cursor position. It returns the number of characters actually read. See “read” in perlfunc for more information.
seek
use Fcntl qw(:seek); # import the SEEK_CUR, SEEK_SET, SEEK_END constants # seek to the position in bytes $fh->seek(0, SEEK_SET); # seek to the position in bytes from the current position $fh->seek(22, SEEK_CUR); # seek to the EOF plus bytes $fh->seek(0, SEEK_END);
The seek
method will attempt to set the cursor to a given position in bytes for the wrapped file handle. See “seek” in perlfunc for more information.
tell
my $bytes = $fh->tell();
The tell
method will attempt to return the current position of the cursor in bytes for the wrapped file handle. See “tell” in perlfunc for more information.
AUTHOR
Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).
CONTRIBUTORS
Dianne Skoll ([email protected]).
COPYRIGHT & LICENSE
Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
100 - Linux cli command Moose_Cookbook_Basics_Person_BUILDARGSAndBUILDpm
NAME 🖥️ Moose_Cookbook_Basics_Person_BUILDARGSAndBUILDpm 🖥️
Using BUILDARGS and BUILD to hook into object construction
VERSION
version 2.2207
SYNOPSIS
package Person; has ssn => ( is => ro, isa => Str, predicate => has_ssn, ); has country_of_residence => ( is => ro, isa => Str, default => usa ); has first_name => ( is => ro, isa => Str, ); has last_name => ( is => ro, isa => Str, ); around BUILDARGS => sub { my $orig = shift; my $class = shift; if ( @_ == 1 && ! ref $_[0] ) { return $class->$orig(ssn => $_[0]); } else { return $class->$orig(@_); } }; sub BUILD { my $self = shift; if ( $self->country_of_residence eq usa ) { die Cannot create a Person who lives in the USA without an ssn. unless $self->has_ssn; } }
DESCRIPTION
This recipe demonstrates the use of BUILDARGS
and BUILD
. By defining these methods, we can hook into the object construction process without overriding new
.
The BUILDARGS
method is called before an object has been created. It is called as a class method, and receives all of the parameters passed to the new
method. It is expected to do something with these arguments and return a hash reference. The keys of the hash must be attribute init_arg
s.
The primary purpose of BUILDARGS
is to allow a class to accept something other than named arguments. In the case of our Person
class, we are allowing it to be called with a single argument, a social security number:
my $person = Person->new(123-45-6789);
The key part of our BUILDARGS
is this conditional:
if ( @_ == 1 && ! ref $_[0] ) { return $class->$orig(ssn => $_[0]); }
By default, Moose constructors accept a list of key-value pairs, or a hash reference. We need to make sure that $_[0]
is not a reference before assuming it is a social security number.
We call the original BUILDARGS
method to handle all the other cases. You should always do this in your own BUILDARGS
methods, since Moose::Object provides its own BUILDARGS
method that handles hash references and a list of key-value pairs.
The BUILD
method is called after the object is constructed, but before it is returned to the caller. The BUILD
method provides an opportunity to check the object state as a whole. This is a good place to put logic that cannot be expressed as a type constraint on a single attribute.
In the Person
class, we need to check the relationship between two attributes, ssn
and country_of_residence
. We throw an exception if the object is not logically consistent.
MORE CONSIDERATIONS
This recipe is made significantly simpler because all of the attributes are read-only. If the country_of_residence
attribute were settable, we would need to check that a Person had an ssn
if the new country was usa
. This could be done with a before
modifier.
CONCLUSION
We have repeatedly discouraged overriding new
in Moose classes. This recipe shows how you can use BUILDARGS
and BUILD
to hook into object construction without overriding new
.
The BUILDARGS
method lets us expand on Moose’s built-in parameter handling for constructors. The BUILD
method lets us implement logical constraints across the whole object after it is created.
AUTHORS
Stevan Little <[email protected]>
Dave Rolsky <[email protected]>
Jesse Luehrs <[email protected]>
Shawn M Moore <[email protected]>
יובל קוג’מן (Yuval Kogman) <[email protected]>
Karen Etheridge <[email protected]>
Florian Ragwitz <[email protected]>
Hans Dieter Pearcey <[email protected]>
Chris Prather <[email protected]>
Matt S Trout <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
101 - Linux cli command WWW_Mechanize_Cookbookpm
NAME 🖥️ WWW_Mechanize_Cookbookpm 🖥️
Recipes for using WWW::Mechanize
VERSION
version 2.18
INTRODUCTION
First, please note that many of these are possible just using LWP::UserAgent. Since WWW::Mechanize
is a subclass of LWP::UserAgent, whatever works on LWP::UserAgent
should work on WWW::Mechanize
. See the lwpcook man page included with LWP.
BASICS
Launch the WWW::Mechanize browser
use WWW::Mechanize; my $mech = WWW::Mechanize->new( autocheck => 1 );
The autocheck => 1
tells Mechanize to die if any IO fails, so you don’t have to manually check. It’s easier that way. If you want to do your own error checking, leave it out.
Fetch a page
$mech->get( “http://search.cpan.org” ); print $mech->content;
$mech->content
contains the raw HTML from the web page. It is not parsed or handled in any way, at least through the content
method.
Fetch a page into a file
Sometimes you want to dump your results directly into a file. For example, there’s no reason to read a JPEG into memory if you’re only going to write it out immediately. This can also help with memory issues on large files.
$mech->get( “http://www.cpan.org/src/stable.tar.gz", “:content_file” => “stable.tar.gz” );
Fetch a password-protected page
Generally, just call credentials
before fetching the page.
$mech->credentials( admin => password ); $mech->get( http://10.11.12.13/password.html ); print $mech->content();
LINKS
Find all image links
Find all links that point to a JPEG, GIF or PNG.
my @links = $mech->find_all_links( tag => “a”, url_regex => qr/(jpe?g|gif|png)$/i );
Find all download links
Find all links that have the word “download” in them.
my @links = $mech->find_all_links( tag => “a”, text_regex => qr/download/i );
ADVANCED
See what will be sent without actually sending anything
$mech->add_handler(“request_send”, sub { shift->dump; exit; }); $mech->get(“http://www.example.com”);
SEE ALSO
WWW::Mechanize
AUTHOR
Andy Lester <andy at petdance.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2004 by Andy Lester.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
102 - Linux cli command getchar
NAME 🖥️ getchar 🖥️
input of characters and strings
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdio.h>
int fgetc(FILE *stream);
int getc(FILE *stream);
int getchar(void);
char *fgets(char s[restrict .size], int size, FILE *restrict stream);
int ungetc(int c, FILE *stream);
DESCRIPTION
fgetc() reads the next character from stream and returns it as an unsigned char cast to an int, or EOF on end of file or error.
getc() is equivalent to fgetc() except that it may be implemented as a macro which evaluates stream more than once.
getchar() is equivalent to getc(stdin).
fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF or a newline. If a newline is read, it is stored into the buffer. A terminating null byte (‘�’) is stored after the last character in the buffer.
ungetc() pushes c back to stream, cast to unsigned char, where it is available for subsequent read operations. Pushed-back characters will be returned in reverse order; only one pushback is guaranteed.
Calls to the functions described here can be mixed with each other and with calls to other input functions from the stdio library for the same input stream.
For nonlocking counterparts, see unlocked_stdio(3).
RETURN VALUE
fgetc(), getc(), and getchar() return the character read as an unsigned char cast to an int or EOF on end of file or error.
fgets() returns s on success, and NULL on error or when end of file occurs while no characters have been read.
ungetc() returns c on success, or EOF on error.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
fgetc(), fgets(), getc(), getchar(), ungetc() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
POSIX.1-2001, C89.
NOTES
It is not advisable to mix calls to input functions from the stdio library with low-level calls to read(2) for the file descriptor associated with the input stream; the results will be undefined and very probably not what you want.
SEE ALSO
read(2), write(2), ferror(3), fgetwc(3), fgetws(3), fopen(3), fread(3), fseek(3), getline(3), gets(3), getwchar(3), puts(3), scanf(3), ungetwc(3), unlocked_stdio(3), feature_test_macros(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
103 - Linux cli command HTML_Tree_AboutObjectspm
NAME 🖥️ HTML_Tree_AboutObjectspm 🖥️
- article: “User’s View of Object-Oriented Modules”
SYNOPSIS
# This an article, not a module.
DESCRIPTION
The following article by Sean M. Burke first appeared in The Perl Journal #17 and is copyright 2000 The Perl Journal. It appears courtesy of Jon Orwant and The Perl Journal. This document may be distributed under the same terms as Perl itself.
A User’s View of Object-Oriented Modules
– Sean M. Burke
The first time that most Perl programmers run into object-oriented programming when they need to use a module whose interface is object-oriented. This is often a mystifying experience, since talk of methods and constructors is unintelligible to programmers who thought that functions and variables was all there was to worry about.
Articles and books that explain object-oriented programming (OOP), do so in terms of how to program that way. That’s understandable, and if you learn to write object-oriented code of your own, you’d find it easy to use object-oriented code that others write. But this approach is the long way around for people whose immediate goal is just to use existing object-oriented modules, but who don’t yet want to know all the gory details of having to write such modules for themselves.
This article is for those programmers Ω- programmers who want to know about objects from the perspective of using object-oriented modules.
Modules and Their Functional Interfaces
Modules are the main way that Perl provides for bundling up code for later use by yourself or others. As I’m sure you can’t help noticing from reading The Perl Journal, CPAN (the Comprehensive Perl Archive Network) is the repository for modules (or groups of modules) that others have written, to do anything from composing music to accessing Web pages. A good deal of those modules even come with every installation of Perl.
One module that you may have used before, and which is fairly typical in its interface, is Text::Wrap. It comes with Perl, so you don’t even need to install it from CPAN. You use it in a program of yours, by having your program code say early on:
use Text::Wrap;
and after that, you can access a function called wrap
, which inserts line-breaks in text that you feed it, so that the text will be wrapped to seventy-two (or however many) columns.
The way this use Text::Wrap
business works is that the module Text::Wrap exists as a file Text/Wrap.pm somewhere in one of your library directories. That file contains Perl code…
Footnote: And mixed in with the Perl code, there’s documentation, which is what you read with perldoc Text::Wrap. The perldoc program simply ignores the code and formats the documentation text, whereas use Text::Wrap loads and runs the code while ignoring the documentation.
…which, among other things, defines a function called Text::Wrap::wrap
, and then exports
that function, which means that when you say wrap
after having said use Text::Wrap, you’ll be actually calling the Text::Wrap::wrap
function. Some modules don’t export their functions, so you have to call them by their full name, like Text::Wrap::wrap(...parameters...)
.
Regardless of whether the typical module exports the functions it provides, a module is basically just a container for chunks of code that do useful things. The way the module allows for you to interact with it, is its interface. And when, like with Text::Wrap, its interface consists of functions, the module is said to have a functional interface.
Footnote: the term function (and therefore “functional”) has various senses. I’m using the term here in its broadest sense, to refer to routines Ω- bits of code that are called by some name and which take parameters and return some value.
Using modules with functional interfaces is straightforward Ω- instead of defining your own wrap function with sub wrap { ... }
, you entrust use Text::Wrap to do that for you, along with whatever other functions its defines and exports, according to the module’s documentation. Without too much bother, you can even write your own modules to contain your frequently used functions; I suggest having a look at the perlmod
man page for more leads on doing this.
Modules with Object-Oriented Interfaces
So suppose that one day you want to write a program that will automate the process of ftp
ing a bunch of files from one server down to your local machine, and then off to another server.
A quick browse through search.cpan.org turns up the module Net::FTP, which you can download and install it using normal installation instructions (unless your sysadmin has already installed it, as many have).
Like Text::Wrap or any other module with a familiarly functional interface, you start off using Net::FTP in your program by saying:
use Net::FTP;
However, that’s where the similarity ends. The first hint of difference is that the documentation for Net::FTP refers to it as a class. A class is a kind of module, but one that has an object-oriented interface.
Whereas modules like Text::Wrap provide bits of useful code as functions, to be called like function(...parameters...)
or like PackageName::function(...parameters...)
, Net::FTP and other modules with object-oriented interfaces provide methods. Methods are sort of like functions in that they have a name and parameters; but methods look different, and are different, because you have to call them with a syntax that has a class name or an object as a special argument. I’ll explain the syntax for method calls, and then later explain what they all mean.
Some methods are meant to be called as class methods, with the class name (same as the module name) as a special argument. Class methods look like this:
ClassName->methodname(parameter1, parameter2, …) ClassName->methodname() # if no parameters ClassName->methodname # same as above
which you will sometimes see written:
methodname ClassName (parameter1, parameter2, …) methodname ClassName # if no parameters
Basically all class methods are for making new objects, and methods that make objects are called “constructors (and the process of making them is called constructing or instantiating). Constructor methods typically have the name new, or something including new (new_from_file, etc.); but they can conceivably be named anything Ω- DBI’s constructor method is named connect”, for example.
The object that a constructor method returns is typically captured in a scalar variable:
$object = ClassName->new(param1, param2…);
Once you have an object (more later on exactly what that is), you can use the other kind of method call syntax, the syntax for object method calls. Calling object methods is just like class methods, except that instead of the ClassName as the special argument, you use an expression that yields an object. Usually this is just a scalar variable that you earlier captured the output of the constructor in. Object method calls look like this:
$object->methodname(parameter1, parameter2, …); $object->methodname() # if no parameters $object->methodname # same as above
which is occasionally written as:
methodname $object (parameter1, parameter2, …) methodname $object # if no parameters
Examples of method calls are:
my $session1 = Net::FTP->new(“ftp.myhost.com”); # Calls a class method “new”, from class Net::FTP, # with the single parameter “ftp.myhost.com”, # and saves the return value (which is, as usual, # an object), in $session1. # Could also be written: # new Net::FTP(ftp.myhost.com) $session1->login(“sburke”,“aoeuaoeu”) || die “failed to login! “; # calling the object method “login” print “Dir: “, $session1->dir(), " “; $session1->quit; # same as $session1->quit() print “Done “; exit;
Incidentally, I suggest always using the syntaxes with parentheses and -> in them,
Footnote: the character-pair -> is supposed to look like an arrow, not negative greater-than!
and avoiding the syntaxes that start out methodname $object
or methodname ModuleName. When everything’s going right, they all mean the same thing as the -> variants, but the syntax with -> is more visually distinct from function calls, as well as being immune to some kinds of rare but puzzling ambiguities that can arise when you’re trying to call methods that have the same name as subroutines you’ve defined.
But, syntactic alternatives aside, all this talk of constructing objects and object methods begs the question Ω- what is an object? There are several angles to this question that the rest of this article will answer in turn: what can you do with objects? what’s in an object? what’s an object value? and why do some modules use objects at all?
What Can You Do with Objects?
You’ve seen that you can make objects, and call object methods with them. But what are object methods for? The answer depends on the class:
A Net::FTP object represents a session between your computer and an FTP server. So the methods you call on a Net::FTP object are for doing whatever you’d need to do across an FTP connection. You make the session and log in:
my $session = Net::FTP->new(ftp.aol.com); die “Couldnt connect!” unless defined $session; # The class method call to “new” will return # the new object if it goes OK, otherwise it # will return undef. $session->login(sburke, p@ssw3rD) || die “Did I change my password again?”; # The object method “login” will give a true # return value if actually logs in, otherwise # itll return false.
You can use the session object to change directory on that session:
$session->cwd("/home/sburke/public_html”) || die “Hey, that was REALLY supposed to work!”; # if the cwd fails, itll return false
…get files from the machine at the other end of the session…
foreach my $f (log_report_ua.txt, log_report_dom.txt, log_report_browsers.txt) { $session->get($f) || warn “Getting $f failed!” };
…and plenty else, ending finally with closing the connection:
$session->quit();
In short, object methods are for doing things related to (or with) whatever the object represents. For FTP sessions, it’s about sending commands to the server at the other end of the connection, and that’s about it Ω- there, methods are for doing something to the world outside the object, and the objects is just something that specifies what bit of the world (well, what FTP session) to act upon.
With most other classes, however, the object itself stores some kind of information, and it typically makes no sense to do things with such an object without considering the data that’s in the object.
What’s in an Object?
An object is (with rare exceptions) a data structure containing a bunch of attributes, each of which has a value, as well as a name that you use when you read or set the attribute’s value. Some of the object’s attributes are private, meaning you’ll never see them documented because they’re not for you to read or write; but most of the object’s documented attributes are at least readable, and usually writeable, by you. Net::FTP objects are a bit thin on attributes, so we’ll use objects from the class Business::US_Amort for this example. Business::US_Amort is a very simple class (available from CPAN) that I wrote for making calculations to do with loans (specifically, amortization, using US-style algorithms).
An object of the class Business::US_Amort represents a loan with particular parameters, i.e., attributes. The most basic attributes of a loan object are its interest rate, its principal (how much money it’s for), and it’s term (how long it’ll take to repay). You need to set these attributes before anything else can be done with the object. The way to get at those attributes for loan objects is just like the way to get at attributes for any class’s objects: through accessors. An accessor is simply any method that accesses (whether reading or writing, AKA getting or putting) some attribute in the given object. Moreover, accessors are the only way that you can change an object’s attributes. (If a module’s documentation wants you to know about any other way, it’ll tell you.)
Usually, for simplicity’s sake, an accessor is named after the attribute it reads or writes. With Business::US_Amort objects, the accessors you need to use first are principal
, interest_rate
, and term
. Then, with at least those attributes set, you can call the run
method to figure out several things about the loan. Then you can call various accessors, like total_paid_toward_interest
, to read the results:
use Business::US_Amort; my $loan = Business::US_Amort->new; # Set the necessary attributes: $loan->principal(123654); $loan->interest_rate(9.25); $loan->term(20); # twenty years # NOW we know enough to calculate: $loan->run; # And see what came of that: print “Total paid toward interest: A WHOPPING “, $loan->total_paid_interest, “!! “;
This illustrates a convention that’s common with accessors: calling the accessor with no arguments (as with $loan
->total_paid_interest) usually means to read the value of that attribute, but providing a value (as with $loan
->term(20)) means you want that attribute to be set to that value. This stands to reason: why would you be providing a value, if not to set the attribute to that value?
Although a loan’s term, principal, and interest rates are all single numeric values, an objects values can any kind of scalar, or an array, or even a hash. Moreover, an attribute’s value(s) can be objects themselves. For example, consider MIDI files (as I wrote about in TPJ#13): a MIDI file usually consists of several tracks. A MIDI file is complex enough to merit being an object with attributes like its overall tempo, the file-format variant it’s in, and the list of instrument tracks in the file. But tracks themselves are complex enough to be objects too, with attributes like their track-type, a list of MIDI commands if they’re a MIDI track, or raw data if they’re not. So I ended up writing the MIDI modules so that the tracks attribute of a MIDI::Opus object is an array of objects from the class MIDI::Track. This may seem like a runaround Ω- you ask what’s in one object, and get another object, or several! But in this case, it exactly reflects what the module is for Ω- MIDI files contain MIDI tracks, which then contain data.
What is an Object Value?
When you call a constructor like Net::FTP->new(hostname), you get back an object value, a value you can later use, in combination with a method name, to call object methods.
Now, so far we’ve been pretending, in the above examples, that the variables $session
or $loan
are the objects you’re dealing with. This idea is innocuous up to a point, but it’s really a misconception that will, at best, limit you in what you know how to do. The reality is not that the variables $session
or $query
are objects; it’s a little more indirect Ω- they hold values that symbolize objects. The kind of value that $session
or $query
hold is what I’m calling an object value.
To understand what kind of value this is, first think about the other kinds of scalar values you know about: The first two scalar values you probably ever ran into in Perl are numbers and strings, which you learned (or just assumed) will usually turn into each other on demand; that is, the three-character string 2.5 can become the quantity two and a half, and vice versa. Then, especially if you started using perl -w
early on, you learned about the undefined value, which can turn into 0 if you treat it as a number, or the empty-string if you treat it as a string.
Footnote: You may also have been learning about references, in which case you’re ready to hear that object values are just a kind of reference, except that they reflect the class that created thing they point to, instead of merely being a plain old array reference, hash reference, etc. If this makes makes sense to you, and you want to know more about how objects are implemented in Perl, have a look at the
perltoot
man page.
And now you’re learning about object values. An object value is a value that points to a data structure somewhere in memory, which is where all the attributes for this object are stored. That data structure as a whole belongs to a class (probably the one you named in the constructor method, like ClassName->new), so that the object value can be used as part of object method calls.
If you want to actually see what an object value is, you might try just saying print $object
. That’ll get you something like this:
Net::FTP=GLOB(0x20154240)
or
Business::US_Amort=HASH(0x15424020)
That’s not very helpful if you wanted to really get at the object’s insides, but that’s because the object value is only a symbol for the object. This may all sound very abstruse and metaphysical, so a real-world allegory might be very helpful:
You get an advertisement in the mail saying that you have been (im)personally selected to have the rare privilege of applying for a credit card. For whatever reason, this offer sounds good to you, so you fill out the form and mail it back to the credit card company. They gleefully approve the application and create your account, and send you a card with a number on it. Now, you can do things with the number on that card Ω- clerks at stores can ring up things you want to buy, and charge your account by keying in the number on the card. You can pay for things you order online by punching in the card number as part of your online order. You can pay off part of the account by sending the credit card people some of your money (well, a check) with some note (usually the pre-printed slip) that has the card number for the account you want to pay toward. And you should be able to call the credit card company’s computer and ask it things about the card, like its balance, its credit limit, its APR, and maybe an itemization of recent purchases ad payments. Now, what you’re really doing is manipulating a credit card account, a completely abstract entity with some data attached to it (balance, APR, etc). But for ease of access, you have a credit card number that is a symbol for that account. Now, that symbol is just a bunch of digits, and the number is effectively meaningless and useless in and of itself Ω- but in the appropriate context, it’s understood to mean the credit card account you’re accessing.
This is exactly the relationship between objects and object values, and from this analogy, several facts about object values are a bit more explicable:
* An object value does nothing in and of itself, but it’s useful when you use it in the context of an $object
->method call, the same way that a card number is useful in the context of some operation dealing with a card account.
Moreover, several copies of the same object value all refer to the same object, the same way that making several copies of your card number won’t change the fact that they all still refer to the same single account (this is true whether you’re copying the number by just writing it down on different slips of paper, or whether you go to the trouble of forging exact replicas of your own plastic credit card). That’s why this:
$x = Net::FTP->new(“ftp.aol.com”); $x->login(“sburke”, “aoeuaoeu”);
does the same thing as this:
$x = Net::FTP->new(“ftp.aol.com”); $y = $x; $z = $y; $z->login(“sburke”, “aoeuaoeu”);
That is, $z
and $y
and $x
are three different slots for values, but what’s in those slots are all object values pointing to the same object Ω- you don’t have three different FTP connections, just three variables with values pointing to the some single FTP connection.
* You can’t tell much of anything about the object just by looking at the object value, any more than you can see your credit account balance by holding the plastic card up to the light, or by adding up the digits in your credit card number.
* You can’t just make up your own object values and have them work Ω- they can come only from constructor methods of the appropriate class. Similarly, you get a credit card number only by having a bank approve your application for a credit card account Ω- at which point they let you know what the number of your new card is.
Now, there’s even more to the fact that you can’t just make up your own object value: even though you can print an object value and get a string like Net::FTP=GLOB(0x20154240), that string is just a representation of an object value.
Internally, an object value has a basically different type from a string, or a number, or the undefined value Ω- if $x
holds a real string, then that value’s slot in memory says “this is a value of type string, and its characters are…, whereas if it’s an object value, the value’s slot in memory says, this is a value of type reference, and the location in memory that it points to is…” (and by looking at what’s at that location, Perl can tell the class of what’s there).
Perl programmers typically don’t have to think about all these details of Perl’s internals. Many other languages force you to be more conscious of the differences between all of these (and also between types of numbers, which are stored differently depending on their size and whether they have fractional parts). But Perl does its best to hide the different types of scalars from you Ω- it turns numbers into strings and back as needed, and takes the string or number representation of undef or of object values as needed. However, you can’t go from a string representation of an object value, back to an object value. And that’s why this doesn’t work:
$x = Net::FTP->new(ftp.aol.com); $y = Net::FTP->new(ftp.netcom.com); $z = Net::FTP->new(ftp.qualcomm.com); $all = join( , $x,$y,$z); # !!! …later… ($aol, $netcom, $qualcomm) = split( , $all); # !!! $aol->login(“sburke”, “aoeuaoeu”); $netcom->login(“sburke”, “qjkxqjkx”); $qualcomm->login(“smb”, “dhtndhtn”);
This fails because $aol
ends up holding merely the string representation of the object value from $x
, not the object value itself Ω- when join
tried to join the characters of the strings $x
, $y
, and $z
, Perl saw that they weren’t strings at all, so it gave join
their string representations.
Unfortunately, this distinction between object values and their string representations doesn’t really fit into the analogy of credit card numbers, because credit card numbers really are numbers Ω- even thought they don’t express any meaningful quantity, if you stored them in a database as a quantity (as opposed to just an ASCII string), that wouldn’t stop them from being valid as credit card numbers.
This may seem rather academic, but there’s there’s two common mistakes programmers new to objects often make, which make sense only in terms of the distinction between object values and their string representations:
The first common error involves forgetting (or never having known in the first place) that when you go to use a value as a hash key, Perl uses the string representation of that value. When you want to use the numeric value two and a half as a key, Perl turns it into the three-character string 2.5. But if you then want to use that string as a number, Perl will treat it as meaning two and a half, so you’re usually none the wiser that Perl converted the number to a string and back. But recall that Perl can’t turn strings back into objects Ω- so if you tried to use a Net::FTP object value as a hash key, Perl actually used its string representation, like Net::FTP=GLOB(0x20154240), but that string is unusable as an object value. (Incidentally, there’s a module Tie::RefHash that implements hashes that do let you use real object-values as keys.)
The second common error with object values is in trying to save an object value to disk (whether printing it to a file, or storing it in a conventional database file). All you’ll get is the string, which will be useless.
When you want to save an object and restore it later, you may find that the object’s class already provides a method specifically for this. For example, MIDI::Opus provides methods for writing an object to disk as a standard MIDI file. The file can later be read back into memory by a MIDI::Opus constructor method, which will return a new MIDI::Opus object representing whatever file you tell it to read into memory. Similar methods are available with, for example, classes that manipulate graphic images and can save them to files, which can be read back later.
But some classes, like Business::US_Amort, provide no such methods for storing an object in a file. When this is the case, you can try using any of the Data::Dumper, Storable, or FreezeThaw modules. Using these will be unproblematic for objects of most classes, but it may run into limitations with others. For example, a Business::US_Amort object can be turned into a string with Data::Dumper, and that string written to a file. When it’s restored later, its attributes will be accessible as normal. But in the unlikely case that the loan object was saved in mid-calculation, the calculation may not be resumable. This is because of the way that that particular class does its calculations, but similar limitations may occur with objects from other classes.
But often, even wanting to save an object is basically wrong Ω- what would saving an ftp session even mean? Saving the hostname, username, and password? current directory on both machines? the local TCP/IP port number? In the case of saving a Net::FTP object, you’re better off just saving whatever details you actually need for your own purposes, so that you can make a new object later and just set those values for it.
So Why Do Some Modules Use Objects?
All these details of using objects are definitely enough to make you wonder Ω- is it worth the bother? If you’re a module author, writing your module with an object-oriented interface restricts the audience of potential users to those who understand the basic concepts of objects and object values, as well as Perl’s syntax for calling methods. Why complicate things by having an object-oriented interface?
A somewhat esoteric answer is that a module has an object-oriented interface because the module’s insides are written in an object-oriented style. This article is about the basics of object-oriented interfaces, and it’d be going far afield to explain what object-oriented design is. But the short story is that object-oriented design is just one way of attacking messy problems. It’s a way that many programmers find very helpful (and which others happen to find to be far more of a hassle than it’s worth, incidentally), and it just happens to show up for you, the module user, as merely the style of interface.
But a simpler answer is that a functional interface is sometimes a hindrance, because it limits the number of things you can do at once Ω- limiting it, in fact, to one. For many problems that some modules are meant to solve, doing without an object-oriented interface would be like wishing that Perl didn’t use filehandles. The ideas are rather simpler Ω- just imagine that Perl let you access files, but only one at a time, with code like:
open(“foo.txt”) || die “Cant open foo.txt: $!”; while(readline) { print $_ if /bar/; } close;
That hypothetical kind of Perl would be simpler, by doing without filehandles. But you’d be out of luck if you wanted to read from one file while reading from another, or read from two and print to a third.
In the same way, a functional FTP module would be fine for just uploading files to one server at a time, but it wouldn’t allow you to easily write programs that make need to use several simultaneous sessions (like look at server A and server B, and if A has a file called X.dat, then download it locally and then upload it to server B Ω- except if B has a file called Y.dat, in which case do it the other way around).
Some kinds of problems that modules solve just lend themselves to an object-oriented interface. For those kinds of tasks, a functional interface would be more familiar, but less powerful. Learning to use object-oriented modules’ interfaces does require becoming comfortable with the concepts from this article. But in the end it will allow you to use a broader range of modules and, with them, to write programs that can do more.
[end body of article]
[Author Credit]
Sean M. Burke has contributed several modules to CPAN, about half of them object-oriented.
[The next section should be in a greybox:]
The Gory Details
For sake of clarity of explanation, I had to oversimplify some of the facts about objects. Here’s a few of the gorier details:
* Every example I gave of a constructor was a class method. But object methods can be constructors, too, if the class was written to work that way: $new
= $old
->copy, $node_y
= $node_x
->new_subnode, or the like.
* I’ve given the impression that there’s two kinds of methods: object methods and class methods. In fact, the same method can be both, because it’s not the kind of method it is, but the kind of calls it’s written to accept Ω- calls that pass an object, or calls that pass a class-name.
* The term object value isn’t something you’ll find used much anywhere else. It’s just my shorthand for what would properly be called an object reference or reference to a blessed item. In fact, people usually say object when they properly mean a reference to that object.
* I mentioned creating objects with constructors, but I didn’t mention destroying them with destructor Ω- a destructor is a kind of method that you call to tidy up the object once you’re done with it, and want it to neatly go away (close connections, delete temporary files, free up memory, etc). But because of the way Perl handles memory, most modules won’t require the user to know about destructors.
* I said that class method syntax has to have the class name, as in $session
= Net::FTP->new($host). Actually, you can instead use any expression that returns a class name: $ftp_class
= ‘Net::FTP’; $session
= $ftp_class
->new($host). Moreover, instead of the method name for object- or class-method calls, you can use a scalar holding the method name: $foo
->$method
($host). But, in practice, these syntaxes are rarely useful.
And finally, to learn about objects from the perspective of writing your own classes, see the perltoot
documentation, or Damian Conway’s exhaustive and clear book Object Oriented Perl (Manning Publications 1999, ISBN 1-884777-79-1).
BACK
Return to the HTML::Tree docs.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
104 - Linux cli command Spreadsheet_ParseExcel_Workbookpm
get_active_sheet()
Return the number of the active (open) worksheet (at the time the workbook was saved. May return undef.
NAME 🖥️ Spreadsheet_ParseExcel_Workbookpm 🖥️
A class for Workbooks.
SYNOPSIS
See the documentation for Spreadsheet::ParseExcel.
DESCRIPTION
This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.
Methods
The following Workbook methods are available:
$workbook->worksheets() $workbook->worksheet() $workbook->worksheet_count() $workbook->get_filename() $workbook->get_print_areas() $workbook->get_print_titles() $workbook->using_1904_date()
worksheets()
The worksheets()
method returns an array of Worksheet objects. This was most commonly used to iterate over the worksheets in a workbook:
for my $worksheet ( $workbook->worksheets() ) { … }
worksheet()
The worksheet()
method returns a single Worksheet
object using either its name or index:
$worksheet = $workbook->worksheet(Sheet1); $worksheet = $workbook->worksheet(0);
Returns undef
if the sheet name or index doesn’t exist.
worksheet_count()
The worksheet_count()
method returns the number of Woksheet objects in the Workbook.
my $worksheet_count = $workbook->worksheet_count();
get_filename()
The get_filename()
method returns the name of the Excel file of undef
if the data was read from a filehandle rather than a file.
my $filename = $workbook->get_filename();
get_print_areas()
The get_print_areas()
method returns an array ref of print areas.
my $print_areas = $workbook->get_print_areas();
Each print area is as follows:
[ $start_row, $start_col, $end_row, $end_col ]
Returns undef if there are no print areas.
get_print_titles()
The get_print_titles()
method returns an array ref of print title hash refs.
my $print_titles = $workbook->get_print_titles();
Each print title array ref is as follows:
{ Row => [ $start_row, $end_row ], Column => [ $start_col, $end_col ], }
Returns undef if there are no print titles.
using_1904_date()
The using_1904_date()
method returns true if the Excel file is using the 1904 date epoch instead of the 1900 epoch.
my $using_1904_date = $workbook->using_1904_date(); The Windows version of Excel generally uses the 1900 epoch while the Mac version of Excel generally uses the 1904 epoch.
Returns 0 if the 1900 epoch is in use.
AUTHOR
Current maintainer 0.60+: Douglas Wilson [email protected]
Maintainer 0.40-0.59: John McNamara [email protected]
Maintainer 0.27-0.33: Gabor Szabo [email protected]
Original author: Kawai Takanori [email protected]
COPYRIGHT
Copyright (c) 2014 Douglas Wilson
Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
Copyright (c) 2000-2006 Kawai Takanori
All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
105 - Linux cli command XtVaGetSubresources
NAME 🖥️ XtVaGetSubresources 🖥️
obtain subresources
SYNTAX
#include <X11/Intrinsic.h>
void XtGetSubresources(Widget w, XtPointer base, const char *name, const char * class, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);
void XtVaGetSubresources(Widget w, XtPointer base, const char *name, const char *class, XtResourceList resources, Cardinal num_resources, …);
ARGUMENTS
args
Specifies the argument list to override resources obtained from the resource database.
base
Specifies the base address of the subpart data structure where the resources should be written.
class
Specifies the class of the subpart.
name
Specifies the name of the subpart.
num_args
Specifies the number of arguments in the argument list.
num_resources
Specifies the number of resources in the resource list.
resources
Specifies the resource list for the subpart.
- Specifies the widget that wants resources for a subpart or that identifies the resource database to search.
…
Specifies the variable arguments to override resources obtained from the resource database.
DESCRIPTION
The XtGetSubresources function constructs a name/class list from the application name/class, the name/classes of all its ancestors, and the widget itself. Then, it appends to this list the name/class pair passed in. The resources are fetched from the argument list, the resource database, or the default values in the resource list. Then, they are copied into the subpart record. If args is NULL, num_args must be zero. However, if num_args is zero, the argument list is not referenced.
SEE ALSO
XtGetApplicationResources, XtVaGetApplicationResources
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
106 - Linux cli command zip_fopen_index_encrypted
libzip (-lzip)
The
function opens the encrypted file name
in
using the password given in the
argument. The
argument are the same as for
The
function opens the file at position
see
These functions are called automatically by
you only need to call them if you want to specify a non-default password (see
Upon successful completion, a
pointer is returned. Otherwise,
is returned and the error code in
is set to indicate the error.
No password was provided.
The function
may also fail and set
for any of the errors specified for the routine
The function
may also fail and set
for any of the errors specified for the routine
and
were added in libzip 1.0.
and
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
107 - Linux cli command Image_ExifTool_TagLookuppm
NAME 🖥️ Image_ExifTool_TagLookuppm 🖥️
Fast lookup for ExifTool tags
SYNOPSIS
This module is required by Image::ExifTool for writing tags.
DESCRIPTION
Provides a fast, case insensitive lookup for tag names.
AUTHOR
Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Image::ExifTool (3pm), Image::ExifTool::BuildTagLookup (3pm), Image::ExifTool::TagNames (3pm)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
108 - Linux cli command mmap64
NAME 🖥️ mmap64 🖥️
map or unmap files or devices into memory
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <sys/mman.h>
void *mmap(void addr[.length], size_t length",int prot ,int"flags,
int fd, off_t offset);
int munmap(void addr[.length], size_t length);
See NOTES for information on feature test macro requirements.
DESCRIPTION
mmap() creates a new mapping in the virtual address space of the calling process. The starting address for the new mapping is specified in addr. The length argument specifies the length of the mapping (which must be greater than 0).
If addr is NULL, then the kernel chooses the (page-aligned) address at which to create the mapping; this is the most portable method of creating a new mapping. If addr is not NULL, then the kernel takes it as a hint about where to place the mapping; on Linux, the kernel will pick a nearby page boundary (but always above or equal to the value specified by /proc/sys/vm/mmap_min_addr) and attempt to create the mapping there. If another mapping already exists there, the kernel picks a new address that may or may not depend on the hint. The address of the new mapping is returned as the result of the call.
The contents of a file mapping (as opposed to an anonymous mapping; see MAP_ANONYMOUS below), are initialized using length bytes starting at offset offset in the file (or other object) referred to by the file descriptor fd. offset must be a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE).
After the mmap() call has returned, the file descriptor, fd, can be closed immediately without invalidating the mapping.
The prot argument describes the desired memory protection of the mapping (and must not conflict with the open mode of the file). It is either PROT_NONE or the bitwise OR of one or more of the following flags:
PROT_EXEC
Pages may be executed.
PROT_READ
Pages may be read.
PROT_WRITE
Pages may be written.
PROT_NONE
Pages may not be accessed.
The flags argument
The flags argument determines whether updates to the mapping are visible to other processes mapping the same region, and whether updates are carried through to the underlying file. This behavior is determined by including exactly one of the following values in flags:
MAP_SHARED
Share this mapping. Updates to the mapping are visible to other processes mapping the same region, and (in the case of file-backed mappings) are carried through to the underlying file. (To precisely control when updates are carried through to the underlying file requires the use of msync(2).)
MAP_SHARED_VALIDATE (since Linux 4.15)
This flag provides the same behavior as MAP_SHARED except that MAP_SHARED mappings ignore unknown flags in flags. By contrast, when creating a mapping using MAP_SHARED_VALIDATE, the kernel verifies all passed flags are known and fails the mapping with the error EOPNOTSUPP for unknown flags. This mapping type is also required to be able to use some mapping flags (e.g., MAP_SYNC).
MAP_PRIVATE
Create a private copy-on-write mapping. Updates to the mapping are not visible to other processes mapping the same file, and are not carried through to the underlying file. It is unspecified whether changes made to the file after the mmap() call are visible in the mapped region.
Both MAP_SHARED and MAP_PRIVATE are described in POSIX.1-2001 and POSIX.1-2008. MAP_SHARED_VALIDATE is a Linux extension.
In addition, zero or more of the following values can be ORed in flags:
MAP_32BIT (since Linux 2.4.20, 2.6)
Put the mapping into the first 2 Gigabytes of the process address space. This flag is supported only on x86-64, for 64-bit programs. It was added to allow thread stacks to be allocated somewhere in the first 2 GB of memory, so as to improve context-switch performance on some early 64-bit processors. Modern x86-64 processors no longer have this performance problem, so use of this flag is not required on those systems. The MAP_32BIT flag is ignored when MAP_FIXED is set.
MAP_ANON
Synonym for MAP_ANONYMOUS; provided for compatibility with other implementations.
MAP_ANONYMOUS
The mapping is not backed by any file; its contents are initialized to zero. The fd argument is ignored; however, some implementations require fd to be -1 if MAP_ANONYMOUS (or MAP_ANON) is specified, and portable applications should ensure this. The offset argument should be zero. Support for MAP_ANONYMOUS in conjunction with MAP_SHARED was added in Linux 2.4.
MAP_DENYWRITE
This flag is ignored. (Long ago—Linux 2.0 and earlier—it signaled that attempts to write to the underlying file should fail with ETXTBSY. But this was a source of denial-of-service attacks.)
MAP_EXECUTABLE
This flag is ignored.
MAP_FILE
Compatibility flag. Ignored.
MAP_FIXED
Don’t interpret addr as a hint: place the mapping at exactly that address. addr must be suitably aligned: for most architectures a multiple of the page size is sufficient; however, some architectures may impose additional restrictions. If the memory region specified by addr and length overlaps pages of any existing mapping(s), then the overlapped part of the existing mapping(s) will be discarded. If the specified address cannot be used, mmap() will fail.
Software that aspires to be portable should use the MAP_FIXED flag with care, keeping in mind that the exact layout of a process’s memory mappings is allowed to change significantly between Linux versions, C library versions, and operating system releases. Carefully read the discussion of this flag in NOTES!
MAP_FIXED_NOREPLACE (since Linux 4.17)
This flag provides behavior that is similar to MAP_FIXED with respect to the addr enforcement, but differs in that MAP_FIXED_NOREPLACE never clobbers a preexisting mapped range. If the requested range would collide with an existing mapping, then this call fails with the error EEXIST. This flag can therefore be used as a way to atomically (with respect to other threads) attempt to map an address range: one thread will succeed; all others will report failure.
Note that older kernels which do not recognize the MAP_FIXED_NOREPLACE flag will typically (upon detecting a collision with a preexisting mapping) fall back to a “non-MAP_FIXED” type of behavior: they will return an address that is different from the requested address. Therefore, backward-compatible software should check the returned address against the requested address.
MAP_GROWSDOWN
This flag is used for stacks. It indicates to the kernel virtual memory system that the mapping should extend downward in memory. The return address is one page lower than the memory area that is actually created in the process’s virtual address space. Touching an address in the “guard” page below the mapping will cause the mapping to grow by a page. This growth can be repeated until the mapping grows to within a page of the high end of the next lower mapping, at which point touching the “guard” page will result in a SIGSEGV signal.
MAP_HUGETLB (since Linux 2.6.32)
Allocate the mapping using “huge” pages. See the Linux kernel source file Documentation/admin-guide/mm/hugetlbpage.rst for further information, as well as NOTES, below.
MAP_HUGE_2MB
MAP_HUGE_1GB (since Linux 3.8)
Used in conjunction with MAP_HUGETLB to select alternative hugetlb page sizes (respectively, 2 MB and 1 GB) on systems that support multiple hugetlb page sizes.
More generally, the desired huge page size can be configured by encoding the base-2 logarithm of the desired page size in the six bits at the offset MAP_HUGE_SHIFT. (A value of zero in this bit field provides the default huge page size; the default huge page size can be discovered via the Hugepagesize field exposed by /proc/meminfo.) Thus, the above two constants are defined as:
#define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT)
#define MAP_HUGE_1GB (30 << MAP_HUGE_SHIFT)
The range of huge page sizes that are supported by the system can be discovered by listing the subdirectories in /sys/kernel/mm/hugepages.
MAP_LOCKED (since Linux 2.5.37)
Mark the mapped region to be locked in the same way as mlock(2). This implementation will try to populate (prefault) the whole range but the mmap() call doesn’t fail with ENOMEM if this fails. Therefore major faults might happen later on. So the semantic is not as strong as mlock(2). One should use mmap() plus mlock(2) when major faults are not acceptable after the initialization of the mapping. The MAP_LOCKED flag is ignored in older kernels.
MAP_NONBLOCK (since Linux 2.5.46)
This flag is meaningful only in conjunction with MAP_POPULATE. Don’t perform read-ahead: create page tables entries only for pages that are already present in RAM. Since Linux 2.6.23, this flag causes MAP_POPULATE to do nothing. One day, the combination of MAP_POPULATE and MAP_NONBLOCK may be reimplemented.
MAP_NORESERVE
Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get SIGSEGV upon a write if no physical memory is available. See also the discussion of the file /proc/sys/vm/overcommit_memory in proc(5). Before Linux 2.6, this flag had effect only for private writable mappings.
MAP_POPULATE (since Linux 2.5.46)
Populate (prefault) page tables for a mapping. For a file mapping, this causes read-ahead on the file. This will help to reduce blocking on page faults later. The mmap() call doesn’t fail if the mapping cannot be populated (for example, due to limitations on the number of mapped huge pages when using MAP_HUGETLB). Support for MAP_POPULATE in conjunction with private mappings was added in Linux 2.6.23.
MAP_STACK (since Linux 2.6.27)
Allocate the mapping at an address suitable for a process or thread stack.
This flag is currently a no-op on Linux. However, by employing this flag, applications can ensure that they transparently obtain support if the flag is implemented in the future. Thus, it is used in the glibc threading implementation to allow for the fact that some architectures may (later) require special treatment for stack allocations. A further reason to employ this flag is portability: MAP_STACK exists (and has an effect) on some other systems (e.g., some of the BSDs).
MAP_SYNC (since Linux 4.15)
This flag is available only with the MAP_SHARED_VALIDATE mapping type; mappings of type MAP_SHARED will silently ignore this flag. This flag is supported only for files supporting DAX (direct mapping of persistent memory). For other files, creating a mapping with this flag results in an EOPNOTSUPP error.
Shared file mappings with this flag provide the guarantee that while some memory is mapped writable in the address space of the process, it will be visible in the same file at the same offset even after the system crashes or is rebooted. In conjunction with the use of appropriate CPU instructions, this provides users of such mappings with a more efficient way of making data modifications persistent.
MAP_UNINITIALIZED (since Linux 2.6.33)
Don’t clear anonymous pages. This flag is intended to improve performance on embedded devices. This flag is honored only if the kernel was configured with the CONFIG_MMAP_ALLOW_UNINITIALIZED option. Because of the security implications, that option is normally enabled only on embedded devices (i.e., devices where one has complete control of the contents of user memory).
Of the above flags, only MAP_FIXED is specified in POSIX.1-2001 and POSIX.1-2008. However, most systems also support MAP_ANONYMOUS (or its synonym MAP_ANON).
munmap()
The munmap() system call deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. The region is also automatically unmapped when the process is terminated. On the other hand, closing the file descriptor does not unmap the region.
The address addr must be a multiple of the page size (but length need not be). All pages containing a part of the indicated range are unmapped, and subsequent references to these pages will generate SIGSEGV. It is not an error if the indicated range does not contain any mapped pages.
RETURN VALUE
On success, mmap() returns a pointer to the mapped area. On error, the value MAP_FAILED (that is, (void *) -1) is returned, and errno is set to indicate the error.
On success, munmap() returns 0. On failure, it returns -1, and errno is set to indicate the error (probably to EINVAL).
ERRORS
EACCES
A file descriptor refers to a non-regular file. Or a file mapping was requested, but fd is not open for reading. Or MAP_SHARED was requested and PROT_WRITE is set, but fd is not open in read/write (O_RDWR) mode. Or PROT_WRITE is set, but the file is append-only.
EAGAIN
The file has been locked, or too much memory has been locked (see setrlimit(2)).
EBADF
fd is not a valid file descriptor (and MAP_ANONYMOUS was not set).
EEXIST
MAP_FIXED_NOREPLACE was specified in flags, and the range covered by addr and length clashes with an existing mapping.
EINVAL
We don’t like addr, length, or offset (e.g., they are too large, or not aligned on a page boundary).
EINVAL
(since Linux 2.6.12) length was 0.
EINVAL
flags contained none of MAP_PRIVATE, MAP_SHARED, or MAP_SHARED_VALIDATE.
ENFILE
The system-wide limit on the total number of open files has been reached.
ENODEV
The underlying filesystem of the specified file does not support memory mapping.
ENOMEM
No memory is available.
ENOMEM
The process’s maximum number of mappings would have been exceeded. This error can also occur for munmap(), when unmapping a region in the middle of an existing mapping, since this results in two smaller mappings on either side of the region being unmapped.
ENOMEM
(since Linux 4.7) The process’s RLIMIT_DATA limit, described in getrlimit(2), would have been exceeded.
ENOMEM
We don’t like addr, because it exceeds the virtual address space of the CPU.
EOVERFLOW
On 32-bit architecture together with the large file extension (i.e., using 64-bit off_t): the number of pages used for length plus number of pages used for offset would overflow unsigned long (32 bits).
EPERM
The prot argument asks for PROT_EXEC but the mapped area belongs to a file on a filesystem that was mounted no-exec.
EPERM
The operation was prevented by a file seal; see fcntl(2).
EPERM
The MAP_HUGETLB flag was specified, but the caller was not privileged (did not have the CAP_IPC_LOCK capability) and is not a member of the sysctl_hugetlb_shm_group group; see the description of /proc/sys/vm/sysctl_hugetlb_shm_group in proc_sys(5).
ETXTBSY
MAP_DENYWRITE was set but the object specified by fd is open for writing.
Use of a mapped region can result in these signals:
SIGSEGV
Attempted write into a region mapped as read-only.
SIGBUS
Attempted access to a page of the buffer that lies beyond the end of the mapped file. For an explanation of the treatment of the bytes in the page that corresponds to the end of a mapped file that is not a multiple of the page size, see NOTES.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
mmap(), munmap() | Thread safety | MT-Safe |
VERSIONS
On some hardware architectures (e.g., i386), PROT_WRITE implies PROT_READ. It is architecture dependent whether PROT_READ implies PROT_EXEC or not. Portable programs should always set PROT_EXEC if they intend to execute code in the new mapping.
The portable way to create a mapping is to specify addr as 0 (NULL), and omit MAP_FIXED from flags. In this case, the system chooses the address for the mapping; the address is chosen so as not to conflict with any existing mapping, and will not be 0. If the MAP_FIXED flag is specified, and addr is 0 (NULL), then the mapped address will be 0 (NULL).
Certain flags constants are defined only if suitable feature test macros are defined (possibly by default): _DEFAULT_SOURCE with glibc 2.19 or later; or _BSD_SOURCE or _SVID_SOURCE in glibc 2.19 and earlier. (Employing _GNU_SOURCE also suffices, and requiring that macro specifically would have been more logical, since these flags are all Linux-specific.) The relevant flags are: MAP_32BIT, MAP_ANONYMOUS (and the synonym MAP_ANON), MAP_DENYWRITE, MAP_EXECUTABLE, MAP_FILE, MAP_GROWSDOWN, MAP_HUGETLB, MAP_LOCKED, MAP_NONBLOCK, MAP_NORESERVE, MAP_POPULATE, and MAP_STACK.
C library/kernel differences
This page describes the interface provided by the glibc mmap() wrapper function. Originally, this function invoked a system call of the same name. Since Linux 2.4, that system call has been superseded by mmap2(2), and nowadays the glibc mmap() wrapper function invokes mmap2(2) with a suitably adjusted value for offset.
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001, SVr4, 4.4BSD.
On POSIX systems on which mmap(), msync(2), and munmap() are available, _POSIX_MAPPED_FILES is defined in <unistd.h> to a value greater than 0. (See also sysconf(3).)
NOTES
Memory mapped by mmap() is preserved across fork(2), with the same attributes.
A file is mapped in multiples of the page size. For a file that is not a multiple of the page size, the remaining bytes in the partial page at the end of the mapping are zeroed when mapped, and modifications to that region are not written out to the file. The effect of changing the size of the underlying file of a mapping on the pages that correspond to added or removed regions of the file is unspecified.
An application can determine which pages of a mapping are currently resident in the buffer/page cache using mincore(2).
Using MAP_FIXED safely
The only safe use for MAP_FIXED is where the address range specified by addr and length was previously reserved using another mapping; otherwise, the use of MAP_FIXED is hazardous because it forcibly removes preexisting mappings, making it easy for a multithreaded process to corrupt its own address space.
For example, suppose that thread A looks through /proc/pid/maps in order to locate an unused address range that it can map using MAP_FIXED, while thread B simultaneously acquires part or all of that same address range. When thread A subsequently employs mmap(MAP_FIXED), it will effectively clobber the mapping that thread B created. In this scenario, thread B need not create a mapping directly; simply making a library call that, internally, uses dlopen(3) to load some other shared library, will suffice. The dlopen(3) call will map the library into the process’s address space. Furthermore, almost any library call may be implemented in a way that adds memory mappings to the address space, either with this technique, or by simply allocating memory. Examples include brk(2), malloc(3), pthread_create(3), and the PAM libraries .
Since Linux 4.17, a multithreaded program can use the MAP_FIXED_NOREPLACE flag to avoid the hazard described above when attempting to create a mapping at a fixed address that has not been reserved by a preexisting mapping.
Timestamps changes for file-backed mappings
For file-backed mappings, the st_atime field for the mapped file may be updated at any time between the mmap() and the corresponding unmapping; the first reference to a mapped page will update the field if it has not been already.
The st_ctime and st_mtime field for a file mapped with PROT_WRITE and MAP_SHARED will be updated after a write to the mapped region, and before a subsequent msync(2) with the MS_SYNC or MS_ASYNC flag, if one occurs.
Huge page (Huge TLB) mappings
For mappings that employ huge pages, the requirements for the arguments of mmap() and munmap() differ somewhat from the requirements for mappings that use the native system page size.
For mmap(), offset must be a multiple of the underlying huge page size. The system automatically aligns length to be a multiple of the underlying huge page size.
For munmap(), addr, and length must both be a multiple of the underlying huge page size.
BUGS
On Linux, there are no guarantees like those suggested above under MAP_NORESERVE. By default, any process can be killed at any moment when the system runs out of memory.
Before Linux 2.6.7, the MAP_POPULATE flag has effect only if prot is specified as PROT_NONE.
SUSv3 specifies that mmap() should fail if length is 0. However, before Linux 2.6.12, mmap() succeeded in this case: no mapping was created and the call returned addr. Since Linux 2.6.12, mmap() fails with the error EINVAL for this case.
POSIX specifies that the system shall always zero fill any partial page at the end of the object and that system will never write any modification of the object beyond its end. On Linux, when you write data to such partial page after the end of the object, the data stays in the page cache even after the file is closed and unmapped and even though the data is never written to the file itself, subsequent mappings may see the modified content. In some cases, this could be fixed by calling msync(2) before the unmap takes place; however, this doesn’t work on tmpfs(5) (for example, when using the POSIX shared memory interface documented in shm_overview(7)).
EXAMPLES
The following program prints part of the file specified in its first command-line argument to standard output. The range of bytes to be printed is specified via offset and length values in the second and third command-line arguments. The program creates a memory mapping of the required pages of the file and then uses write(2) to output the desired bytes.
Program source
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#define handle_error(msg) \
do { perror(msg); exit(EXIT_FAILURE); } while (0)
int
main(int argc, char *argv[])
{
int fd;
char *addr;
off_t offset, pa_offset;
size_t length;
ssize_t s;
struct stat sb;
if (argc < 3 || argc > 4) {
fprintf(stderr, "%s file offset [length]
“, argv[0]); exit(EXIT_FAILURE); } fd = open(argv[1], O_RDONLY); if (fd == -1) handle_error(“open”); if (fstat(fd, &sb) == -1) /* To obtain file size / handle_error(“fstat”); offset = atoi(argv[2]); pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1); / offset for mmap() must be page aligned / if (offset >= sb.st_size) { fprintf(stderr, “offset is past end of file “); exit(EXIT_FAILURE); } if (argc == 4) { length = atoi(argv[3]); if (offset + length > sb.st_size) length = sb.st_size - offset; / Can’t display bytes past end of file / } else { / No length arg ==> display to end of file */ length = sb.st_size - offset; } addr = mmap(NULL, length + offset - pa_offset, PROT_READ, MAP_PRIVATE, fd, pa_offset); if (addr == MAP_FAILED) handle_error(“mmap”); s = write(STDOUT_FILENO, addr + offset - pa_offset, length); if (s != length) { if (s == -1) handle_error(“write”); fprintf(stderr, “partial write”); exit(EXIT_FAILURE); } munmap(addr, length + offset - pa_offset); close(fd); exit(EXIT_SUCCESS); }
SEE ALSO
ftruncate(2), getpagesize(2), memfd_create(2), mincore(2), mlock(2), mmap2(2), mprotect(2), mremap(2), msync(2), remap_file_pages(2), setrlimit(2), shmat(2), userfaultfd(2), shm_open(3), shm_overview(7)
The descriptions of the following files in proc(5): /proc/pid/maps, /proc/pid/map_files, and /proc/pid/smaps.
B.O. Gallmeister, POSIX.4, O’Reilly, pp. 128–129 and 389–391.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
109 - Linux cli command pthread_tryjoin_np
NAME 🖥️ pthread_tryjoin_np 🖥️
try to join with a terminated thread
LIBRARY
POSIX threads library (libpthread, -lpthread)
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_tryjoin_np(pthread_t thread, void **retval);
int pthread_timedjoin_np(pthread_t thread, void **retval,
const struct timespec *abstime);
DESCRIPTION
These functions operate in the same way as pthread_join(3), except for the differences described on this page.
The pthread_tryjoin_np() function performs a nonblocking join with the thread thread, returning the exit status of the thread in *retval. If thread has not yet terminated, then instead of blocking, as is done by pthread_join(3), the call returns an error.
The pthread_timedjoin_np() function performs a join-with-timeout. If thread has not yet terminated, then the call blocks until a maximum time, specified in abstime, measured against the CLOCK_REALTIME clock. If the timeout expires before thread terminates, the call returns an error. The abstime argument is a timespec(3) structure, specifying an absolute time measured since the Epoch (see time(2)).
RETURN VALUE
On success, these functions return 0; on error, they return an error number.
ERRORS
These functions can fail with the same errors as pthread_join(3). pthread_tryjoin_np() can in addition fail with the following error:
EBUSY
thread had not yet terminated at the time of the call.
pthread_timedjoin_np() can in addition fail with the following errors:
EINVAL
abstime value is invalid (tv_sec is less than 0 or tv_nsec is greater than 1e9).
ETIMEDOUT
The call timed out before thread terminated.
pthread_timedjoin_np() never returns the error EINTR.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
pthread_tryjoin_np(), pthread_timedjoin_np() | Thread safety | MT-Safe |
STANDARDS
GNU; hence the suffix “_np” (nonportable) in the names.
HISTORY
glibc 2.3.3.
BUGS
The pthread_timedjoin_np() function measures time by internally calculating a relative sleep interval that is then measured against the CLOCK_MONOTONIC clock instead of the CLOCK_REALTIME clock. Consequently, the timeout is unaffected by discontinuous changes to the CLOCK_REALTIME clock.
EXAMPLES
The following code waits to join for up to 5 seconds:
struct timespec ts;
int s;
...
if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
/* Handle error */
}
ts.tv_sec += 5;
s = pthread_timedjoin_np(thread, NULL, &ts);
if (s != 0) {
/* Handle error */
}
SEE ALSO
clock_gettime(2), pthread_exit(3), pthread_join(3), timespec(3), pthreads(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
110 - Linux cli command ts_read
NAME 🖥️ ts_read 🖥️
read tslib touch samples
SYNOPSIS
#include <tslib.h>
int ts_read(struct tsdev *dev, struct ts_sample *samp, int nr);
int ts_read_raw(struct tsdev *dev, struct ts_sample *samp, int nr);
int ts_read_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);
int ts_read_raw_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);
DESCRIPTION
ts_read() reads nr input samples with tslib’s filters applied. struct ts_sample is define as follows:
struct ts_sample {
int x;
int y;
unsigned int pressure;
struct timeval tv;
};
ts_read_mt() reads nr * slots input samples with tslib’s filters applied. struct ts_sample_mt is defined as follows:
struct ts_sample_mt {
/* most recent ABS_MT_* event codes.
* see linux/input.h for descriptions */
int x;
int y;
unsigned int pressure;
int slot;
int tracking_id;
int tool_type;
int tool_x;
int tool_y;
unsigned int touch_major;
unsigned int width_major;
unsigned int touch_minor;
unsigned int width_minor;
int orientation;
int distance;
int blob_id;
struct timeval tv;
/* BTN_TOUCH state */
short pen_down;
/* the TSLIB_MT_VALID bit is set in valid if this sample
* contains new data;
* valid is set to 0 otherwise */
short valid;
};
The user has to provide the amount of memory described in nr and slots to hold them.
ts_read_raw() and ts_read_raw_mt() do the same thing without tslib’s filters applied.
RETURN VALUE
The number of actually read samples is returned. Especially when opened in non-blocking mode, see ts_setup() , that can be less than requested in the call. On failure, a negative error number is returned.
EXAMPLE
The following program continuously reads tslib multitouch input samples and prints slot and position values to stdout as the touch screen is touched.
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <tslib.h>
#define READ_SAMPLES 1
#define MAX_SLOTS 5
int main(int argc, char **argv)
{
struct tsdev *ts;
struct ts_sample_mt **samp_mt = NULL;
int i, j;
int ret;
ts = ts_setup(NULL, 0);
if (!ts)
return -1;
samp_mt = malloc(READ_SAMPLES * sizeof(struct ts_sample_mt **));
if (!samp_mt)
return -1;
for (i = 0; i < READ_SAMPLES; i++) {
samp_mt[i] = calloc(MAX_SLOTS, sizeof(struct ts_sample_mt));
if (!samp_mt[i])
return -1;
}
while(1) {
ret = ts_read_mt(ts, samp_mt, MAX_SLOTS, READ_SAMPLES);
for (i = 0; i < ret; i++) {
printf("sample nr %d, i);
for (j = 0; i < MAX_SLOTS; j++) {
if (!(samp_mt[i][j].valid & TSLIB_MT_VALID))
continue;
printf("slot %d: X:%d Y: %d,
samp_mt[i][j].slot,
samp_mt[i][j].x,
samp_mt[i][j].y);
}
}
}
}
SEE ALSO
ts_setup(3), ts_config(3), ts_open(3), ts_close(3), ts.conf(5)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
111 - Linux cli command XtAddGrab
NAME 🖥️ XtAddGrab 🖥️
redirect user input to a modal widget
SYNTAX
#include <X11/Intrinsic.h>
void XtAddGrab(Widget w, Boolean exclusive, Boolean spring_loaded);
void XtRemoveGrab(Widget w);
ARGUMENTS
exclusive
Specifies whether user events should be dispatched exclusively to this widget or also to previous widgets in the cascade.
spring_loaded
Specifies whether this widget was popped up because the user pressed a pointer button.
- Specifies the widget to add to or remove from the modal cascade.
DESCRIPTION
The XtAddGrab function appends the widget (and associated parameters) to the modal cascade and checks that exclusive is True if spring_loaded is True. If these are not True, XtAddGrab generates an error.
The modal cascade is used by XtDispatchEvent when it tries to dispatch a user event. When at least one modal widget is in the widget cascade, XtDispatchEvent first determines if the event should be delivered. It starts at the most recent cascade entry and follows the cascade up to and including the most recent cascade entry added with the exclusive parameter True.
This subset of the modal cascade along with all descendants of these widgets comprise the active subset. User events that occur outside the widgets in this subset are ignored or remapped. Modal menus with submenus generally add a submenu widget to the cascade with exclusive False. Modal dialog boxes that need to restrict user input to the most deeply nested dialog box add a subdialog widget to the cascade with exclusive True. User events that occur within the active subset are delivered to the appropriate widget, which is usually a child or further descendant of the modal widget.
Regardless of where on the screen they occur, remap events are always delivered to the most recent widget in the active subset of the cascade that has spring_loaded True, if any such widget exists.
The XtRemoveGrab function removes widgets from the modal cascade starting at the most recent widget up to and including the specified widget. It issues an error if the specified widget is not on the modal cascade.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
112 - Linux cli command mbstate_ttype
NAME 🖥️ mbstate_ttype 🖥️
multi-byte-character conversion state
LIBRARY
Standard C library (libc)
SYNOPSIS
#include <wchar.h>
typedef /* ... */ mbstate_t;
DESCRIPTION
Character conversion between the multibyte representation and the wide character representation uses conversion state, of type mbstate_t. Conversion of a string uses a finite-state machine; when it is interrupted after the complete conversion of a number of characters, it may need to save a state for processing the remaining characters. Such a conversion state is needed for the sake of encodings such as ISO/IEC 2022 and UTF-7.
The initial state is the state at the beginning of conversion of a string. There are two kinds of state: the one used by multibyte to wide character conversion functions, such as mbsrtowcs(3), and the one used by wide character to multibyte conversion functions, such as wcsrtombs(3), but they both fit in a mbstate_t, and they both have the same representation for an initial state.
For 8-bit encodings, all states are equivalent to the initial state. For multibyte encodings like UTF-8, EUC-*, BIG5, or SJIS, the wide character to multibyte conversion functions never produce non-initial states, but the multibyte to wide-character conversion functions like mbrtowc(3) do produce non-initial states when interrupted in the middle of a character.
One possible way to create an mbstate_t in initial state is to set it to zero:
mbstate_t state;
memset(&state, 0, sizeof(state));
On Linux, the following works as well, but might generate compiler warnings:
mbstate_t state = { 0 };
STANDARDS
C11, POSIX.1-2008.
HISTORY
C99, POSIX.1-2001.
SEE ALSO
mbrlen(3), mbrtowc(3), mbsinit(3), mbsrtowcs(3), wcrtomb(3), wcsrtombs(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
113 - Linux cli command htobe16
NAME 🖥️ htobe16 🖥️
convert values between host and big-/little-endian byte order
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():
Since glibc 2.19:
_DEFAULT_SOURCE
In glibc up to and including 2.19:
_BSD_SOURCE
DESCRIPTION
These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.
The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.
The functions with names of the form “htobenn” convert from host byte order to big-endian order.
The functions with names of the form “htolenn” convert from host byte order to little-endian order.
The functions with names of the form “benntoh” convert from big-endian order to host byte order.
The functions with names of the form “lenntoh” convert from little-endian order to host byte order.
VERSIONS
Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).
STANDARDS
None.
HISTORY
glibc 2.9.
These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().
The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.
EXAMPLES
The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:
$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344
Program source
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
union {
uint32_t u32;
uint8_t arr[4];
} x;
x.arr[0] = 0x11; /* Lowest-address byte */
x.arr[1] = 0x22;
x.arr[2] = 0x33;
x.arr[3] = 0x44; /* Highest-address byte */
printf("x.u32 = %#x
“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }
SEE ALSO
bswap(3), byteorder(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
114 - Linux cli command pcap_datalink_val_to_description_or_dltpcap
NAME 🖥️ pcap_datalink_val_to_description_or_dltpcap 🖥️
get a name or description for a link-layer header type value
SYNOPSIS
#include <pcap.h>
const char *pcap_datalink_val_to_name(int dlt);
const char *pcap_datalink_val_to_description(int dlt);
const char *pcap_datalink_val_to_description_or_dlt(int dlt);
DESCRIPTION
pcap_datalink_val_to_name() translates a link-layer header type value to the corresponding link-layer header type name, which is the DLT_ name for the link-layer header type value with the DLT_ removed. NULL is returned if the type value does not correspond to a known DLT_ value.
pcap_datalink_val_to_description() translates a link-layer header type value to a short description of that link-layer header type. NULL is returned if the type value does not correspond to a known DLT_ value.
pcap_datalink_val_to_description_or_dlt() translates a link-layer header type value to a short description of that link-layer header type just like pcap_datalink_val_to_description(). If the type value does not correspond to a known DLT_ value, the string “DLT n” is returned, where n is the value of the dlt argument.
BACKWARD COMPATIBILITY
The pcap_datalink_val_to_description_or_dlt() function first became available in libpcap release 1.9.1. In previous releases, pcap_datalink_val_to_description() would have to be called and, if it returned NULL, a default string would have to be constructed.
SEE ALSO
pcap(3PCAP)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
115 - Linux cli command getmntent
NAME 🖥️ getmntent 🖥️
get filesystem descriptor file entry
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdio.h>
#include <mntent.h>
FILE *setmntent(const char *filename, const char *type);
struct mntent *getmntent(FILE *stream);
int addmntent(FILE *restrict stream,
const struct mntent *restrict mnt);
int endmntent(FILE *streamp);
char *hasmntopt(const struct mntent *mnt, const char *opt);
/* GNU extension */
#include <mntent.h>
struct mntent *getmntent_r(FILE *restrict streamp,
struct mntent *restrict mntbuf,
char buf[restrict .buflen], int buflen);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getmntent_r():
Since glibc 2.19:
_DEFAULT_SOURCE
glibc 2.19 and earlier:
_BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These routines are used to access the filesystem description file /etc/fstab and the mounted filesystem description file /etc/mtab.
The setmntent() function opens the filesystem description file filename and returns a file pointer which can be used by getmntent(). The argument type is the type of access required and can take the same values as the mode argument of fopen(3). The returned stream should be closed using endmntent() rather than fclose(3).
The getmntent() function reads the next line of the filesystem description file from stream and returns a pointer to a structure containing the broken out fields from a line in the file. The pointer points to a static area of memory which is overwritten by subsequent calls to getmntent().
The addmntent() function adds the mntent structure mnt to the end of the open stream.
The endmntent() function closes the stream associated with the filesystem description file.
The hasmntopt() function scans the mnt_opts field (see below) of the mntent structure mnt for a substring that matches opt. See <mntent.h> and mount(8) for valid mount options.
The reentrant getmntent_r() function is similar to getmntent(), but stores the mntent structure in the provided *mntbuf, and stores the strings pointed to by the entries in that structure in the provided array buf of size buflen.
The mntent structure is defined in <mntent.h> as follows:
struct mntent {
char *mnt_fsname; /* name of mounted filesystem */
char *mnt_dir; /* filesystem path prefix */
char *mnt_type; /* mount type (see mntent.h) */
char *mnt_opts; /* mount options (see mntent.h) */
int mnt_freq; /* dump frequency in days */
int mnt_passno; /* pass number on parallel fsck */
};
Since fields in the mtab and fstab files are separated by whitespace, octal escapes are used to represent the characters space ( ), tab ( ), newline ( ), and backslash () in those files when they occur in one of the four strings in a mntent structure. The routines addmntent() and getmntent() will convert from string representation to escaped representation and back. When converting from escaped representation, the sequence \134 is also converted to a backslash.
RETURN VALUE
The getmntent() and getmntent_r() functions return a pointer to the mntent structure or NULL on failure.
The addmntent() function returns 0 on success and 1 on failure.
The endmntent() function always returns 1.
The hasmntopt() function returns the address of the substring if a match is found and NULL otherwise.
FILES
/etc/fstab
filesystem description file
/etc/mtab
mounted filesystem description file
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
setmntent(), endmntent(), hasmntopt() | Thread safety | MT-Safe |
getmntent() | Thread safety | MT-Unsafe race:mntentbuf locale |
addmntent() | Thread safety | MT-Safe race:stream locale |
getmntent_r() | Thread safety | MT-Safe locale |
STANDARDS
None.
HISTORY
The nonreentrant functions are from SunOS 4.1.3. A routine getmntent_r() was introduced in HP-UX 10, but it returns an int. The prototype shown above is glibc-only.
System V also has a getmntent() function but the calling sequence differs, and the returned structure is different. Under System V /etc/mnttab is used. 4.4BSD and Digital UNIX have a routine getmntinfo(), a wrapper around the system call getfsstat().
SEE ALSO
fopen(3), fstab(5), mount(8)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
116 - Linux cli command XtOwnSelection
NAME 🖥️ XtOwnSelection 🖥️
set selection owner
SYNTAX
#include <X11/Intrinsic.h>
Boolean XtOwnSelection(Widget w, Atom selection, Time time, XtConvertSelectionProc convert_proc, XtLoseSelectionProc lose_selection, XtSelectionDoneProc done_proc);
Boolean XtOwnSelectionIncremental(Widget w, Atom selection, Time time, XtConvertSelectionIncrProc convert_callback, XtLoseSelectionIncrProc lose_callback, XtSelectionDoneIncrProc done_callback, XtCancelConvertSelectionProc cancel_callback, XtPointer client_data);
void XtDisownSelection(Widget w, Atom selection, Time time);
ARGUMENTS
convert_proc
Specifies the procedure that is to be called whenever someone requests the current value of the selection.
done_proc
Specifies the procedure that is called after the requestor has received the selection or NULL if the owner is not interested in being called back.
lose_selection
Specifies the procedure that is to be called whenever the widget has lost selection ownership or NULL if the owner is not interested in being called back.
selection
Specifies an atom that describes the type of the selection (for example, XA_PRIMARY, XA_SECONDARY, or XA_CLIPBOARD).
time
Specifies the timestamp that indicates when the selection ownership should commence or is to be relinquished.
- Specifies the widget that wishes to become the owner or to relinquish ownership.
DESCRIPTION
The XtOwnSelection function informs the Intrinsics selection mechanism that a widget believes it owns a selection. It returns True if the widget has successfully become the owner and False otherwise. The widget may fail to become the owner if some other widget has asserted ownership at a time later than this widget. Note that widgets can lose selection ownership either because someone else asserted later ownership of the selection or because the widget voluntarily gave up ownership of the selection. Also note that the lose_selection procedure is not called if the widget fails to obtain selection ownership in the first place.
The XtOwnSelectionIncremental procedure informs the Intrinsics incremental selection mechanism that the specified widget wishes to own the selection. It returns True if the specified widget successfully becomes the selection owner or False otherwise. For more information about selection, target, and time, see Section 2.6 of the Inter-Client Communication Conventions Manual.
A widget that becomes the selection owner using XtOwnSelectionIncremental may use XtDisownSelection to relinquish selection ownership.
The XtDisownSelection function informs the Intrinsics selection mechanism that the specified widget is to lose ownership of the selection. If the widget does not currently own the selection either because it lost the selection or because it never had the selection to begin with, XtDisownSelection does nothing.
After a widget has called XtDisownSelection, its convert procedure is not called even if a request arrives later with a timestamp during the period that this widget owned the selection. However, its done procedure will be called if a conversion that started before the call to XtDisownSelection finishes after the call to XtDisownSelection.
SEE ALSO
XtAppGetSelectionTimeout(3), XtGetSelectionValue(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
117 - Linux cli command fts_children
NAME 🖥️ fts_children 🖥️
traverse a file hierarchy
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
#include <fts.h>
FTS *fts_open(char *const *path_argv, int options,
int (*_Nullable compar)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *ftsp);
FTSENT *fts_children(FTS *ftsp, int instr);
int fts_set(FTS *ftsp, FTSENT *f, int instr);
int fts_close(FTS *ftsp);
DESCRIPTION
The fts functions are provided for traversing file hierarchies. A simple overview is that the fts_open() function returns a “handle” (of type FTS *) that refers to a file hierarchy “stream”. This handle is then supplied to the other fts functions. The function fts_read() returns a pointer to a structure describing one of the files in the file hierarchy. The function fts_children() returns a pointer to a linked list of structures, each of which describes one of the files contained in a directory in the hierarchy.
In general, directories are visited two distinguishable times; in preorder (before any of their descendants are visited) and in postorder (after all of their descendants have been visited). Files are visited once. It is possible to walk the hierarchy “logically” (visiting the files that symbolic links point to) or physically (visiting the symbolic links themselves), order the walk of the hierarchy or prune and/or revisit portions of the hierarchy.
Two structures (and associated types) are defined in the include file <fts.h>. The first type is FTS, the structure that represents the file hierarchy itself. The second type is FTSENT, the structure that represents a file in the file hierarchy. Normally, an FTSENT structure is returned for every file in the file hierarchy. In this manual page, “file” and “FTSENT structure” are generally interchangeable.
The FTSENT structure contains fields describing a file. The structure contains at least the following fields (there are additional fields that should be considered private to the implementation):
typedef struct _ftsent {
unsigned short fts_info; /* flags for FTSENT structure */
char *fts_accpath; /* access path */
char *fts_path; /* root path */
short fts_pathlen; /* strlen(fts_path) +
strlen(fts_name) */
char *fts_name; /* filename */
short fts_namelen; /* strlen(fts_name) */
short fts_level; /* depth (-1 to N) */
int fts_errno; /* file errno */
long fts_number; /* local numeric value */
void *fts_pointer; /* local address value */
struct _ftsent *fts_parent; /* parent directory */
struct _ftsent *fts_link; /* next file structure */
struct _ftsent *fts_cycle; /* cycle structure */
struct stat *fts_statp; /* [l]stat(2) information */
} FTSENT;
These fields are defined as follows:
fts_info
One of the following values describing the returned FTSENT structure and the file it represents. With the exception of directories without errors (FTS_D), all of these entries are terminal, that is, they will not be revisited, nor will any of their descendants be visited.
FTS_D
A directory being visited in preorder.
FTS_DC
A directory that causes a cycle in the tree. (The fts_cycle field of the FTSENT structure will be filled in as well.)
FTS_DEFAULT
Any FTSENT structure that represents a file type not explicitly described by one of the other fts_info values.
FTS_DNR
A directory which cannot be read. This is an error return, and the fts_errno field will be set to indicate what caused the error.
FTS_DOT
A file named “.” or “..” which was not specified as a filename to fts_open() (see FTS_SEEDOT).
FTS_DP
A directory being visited in postorder. The contents of the FTSENT structure will be unchanged from when it was returned in preorder, that is, with the fts_info field set to FTS_D.
FTS_ERR
This is an error return, and the fts_errno field will be set to indicate what caused the error.
FTS_F
A regular file.
FTS_NS
A file for which no [l] stat(2) information was available. The contents of the fts_statp field are undefined. This is an error return, and the fts_errno field will be set to indicate what caused the error.
FTS_NSOK
A file for which no [l] stat(2) information was requested. The contents of the fts_statp field are undefined.
FTS_SL
A symbolic link.
FTS_SLNONE
A symbolic link with a nonexistent target. The contents of the fts_statp field reference the file characteristic information for the symbolic link itself.
fts_accpath
A path for accessing the file from the current directory.
fts_path
The path for the file relative to the root of the traversal. This path contains the path specified to fts_open() as a prefix.
fts_pathlen
The sum of the lengths of the strings referenced by fts_path and fts_name.
fts_name
The name of the file.
fts_namelen
The length of the string referenced by fts_name.
fts_level
The depth of the traversal, numbered from -1 to N, where this file was found. The FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered -1, and the FTSENT structure for the root itself is numbered 0.
fts_errno
If fts_children() or fts_read() returns an FTSENT structure whose fts_info field is set to FTS_DNR, FTS_ERR, or FTS_NS, the fts_errno field contains the error number (i.e., the errno value) specifying the cause of the error. Otherwise, the contents of the fts_errno field are undefined.
fts_number
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to 0.
fts_pointer
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to NULL.
fts_parent
A pointer to the FTSENT structure referencing the file in the hierarchy immediately above the current file, that is, the directory of which this file is a member. A parent structure for the initial entry point is provided as well, however, only the fts_level, fts_number, and fts_pointer fields are guaranteed to be initialized.
fts_link
Upon return from the fts_children() function, the fts_link field points to the next structure in the NULL-terminated linked list of directory members. Otherwise, the contents of the fts_link field are undefined.
fts_cycle
If a directory causes a cycle in the hierarchy (see FTS_DC), either because of a hard link between two directories, or a symbolic link pointing to a directory, the fts_cycle field of the structure will point to the FTSENT structure in the hierarchy that references the same file as the current FTSENT structure. Otherwise, the contents of the fts_cycle field are undefined.
fts_statp
A pointer to [l] stat(2) information for the file.
A single buffer is used for all of the paths of all of the files in the file hierarchy. Therefore, the fts_path and fts_accpath fields are guaranteed to be null-terminated only for the file most recently returned by fts_read(). To use these fields to reference any files represented by other FTSENT structures will require that the path buffer be modified using the information contained in that FTSENT structure’s fts_pathlen field. Any such modifications should be undone before further calls to fts_read() are attempted. The fts_name field is always null-terminated.
fts_open()
The fts_open() function takes a pointer to an array of character pointers naming one or more paths which make up a logical file hierarchy to be traversed. The array must be terminated by a null pointer.
There are a number of options, at least one of which (either FTS_LOGICAL or FTS_PHYSICAL) must be specified. The options are selected by ORing the following values:
FTS_LOGICAL
This option causes the fts routines to return FTSENT structures for the targets of symbolic links instead of the symbolic links themselves. If this option is set, the only symbolic links for which FTSENT structures are returned to the application are those referencing nonexistent files: the fts_statp field is obtained via stat(2) with a fallback to lstat(2).
FTS_PHYSICAL
This option causes the fts routines to return FTSENT structures for symbolic links themselves instead of the target files they point to. If this option is set, FTSENT structures for all symbolic links in the hierarchy are returned to the application: the fts_statp field is obtained via lstat(2).
FTS_COMFOLLOW
This option causes any symbolic link specified as a root path to be followed immediately, as if via FTS_LOGICAL, regardless of the primary mode.
FTS_NOCHDIR
As a performance optimization, the fts functions change directories as they walk the file hierarchy. This has the side-effect that an application cannot rely on being in any particular directory during the traversal. This option turns off this optimization, and the fts functions will not change the current directory. Note that applications should not themselves change their current directory and try to access files unless FTS_NOCHDIR is specified and absolute pathnames were provided as arguments to fts_open().
FTS_NOSTAT
By default, returned FTSENT structures reference file characteristic information (the fts_statp field) for each file visited. This option relaxes that requirement as a performance optimization, allowing the fts functions to set the fts_info field to FTS_NSOK and leave the contents of the fts_statp field undefined.
FTS_SEEDOT
By default, unless they are specified as path arguments to fts_open(), any files named “.” or “..” encountered in the file hierarchy are ignored. This option causes the fts routines to return FTSENT structures for them.
FTS_XDEV
This option prevents fts from descending into directories that have a different device number than the file from which the descent began.
The argument compar() specifies a user-defined function which may be used to order the traversal of the hierarchy. It takes two pointers to pointers to FTSENT structures as arguments and should return a negative value, zero, or a positive value to indicate if the file referenced by its first argument comes before, in any order with respect to, or after, the file referenced by its second argument. The fts_accpath, fts_path, and fts_pathlen fields of the FTSENT structures may never be used in this comparison. If the fts_info field is set to FTS_NS or FTS_NSOK, the fts_statp field may not either. If the compar() argument is NULL, the directory traversal order is in the order listed in path_argv for the root paths, and in the order listed in the directory for everything else.
fts_read()
The fts_read() function returns a pointer to an FTSENT structure describing a file in the hierarchy. Directories (that are readable and do not cause cycles) are visited at least twice, once in preorder and once in postorder. All other files are visited at least once. (Hard links between directories that do not cause cycles or symbolic links to symbolic links may cause files to be visited more than once, or directories more than twice.)
If all the members of the hierarchy have been returned, fts_read() returns NULL and sets errno to 0. If an error unrelated to a file in the hierarchy occurs, fts_read() returns NULL and sets errno to indicate the error. If an error related to a returned file occurs, a pointer to an FTSENT structure is returned, and errno may or may not have been set (see fts_info).
The FTSENT structures returned by fts_read() may be overwritten after a call to fts_close() on the same file hierarchy stream, or, after a call to fts_read() on the same file hierarchy stream unless they represent a file of type directory, in which case they will not be overwritten until after a call to fts_read() after the FTSENT structure has been returned by the function fts_read() in postorder.
fts_children()
The fts_children() function returns a pointer to an FTSENT structure describing the first entry in a NULL-terminated linked list of the files in the directory represented by the FTSENT structure most recently returned by fts_read(). The list is linked through the fts_link field of the FTSENT structure, and is ordered by the user-specified comparison function, if any. Repeated calls to fts_children() will re-create this linked list.
As a special case, if fts_read() has not yet been called for a hierarchy, fts_children() will return a pointer to the files in the logical directory specified to fts_open(), that is, the arguments specified to fts_open(). Otherwise, if the FTSENT structure most recently returned by fts_read() is not a directory being visited in preorder, or the directory does not contain any files, fts_children() returns NULL and sets errno to zero. If an error occurs, fts_children() returns NULL and sets errno to indicate the error.
The FTSENT structures returned by fts_children() may be overwritten after a call to fts_children(), fts_close(), or fts_read() on the same file hierarchy stream.
The instr argument is either zero or the following value:
FTS_NAMEONLY
Only the names of the files are needed. The contents of all the fields in the returned linked list of structures are undefined with the exception of the fts_name and fts_namelen fields.
fts_set()
The function fts_set() allows the user application to determine further processing for the file f of the stream ftsp. The fts_set() function returns 0 on success, and -1 if an error occurs.
The instr argument is either 0 (meaning “do nothing”) or one of the following values:
FTS_AGAIN
Revisit the file; any file type may be revisited. The next call to fts_read() will return the referenced file. The fts_stat and fts_info fields of the structure will be reinitialized at that time, but no other fields will have been changed. This option is meaningful only for the most recently returned file from fts_read(). Normal use is for postorder directory visits, where it causes the directory to be revisited (in both preorder and postorder) as well as all of its descendants.
FTS_FOLLOW
The referenced file must be a symbolic link. If the referenced file is the one most recently returned by fts_read(), the next call to fts_read() returns the file with the fts_info and fts_statp fields reinitialized to reflect the target of the symbolic link instead of the symbolic link itself. If the file is one of those most recently returned by fts_children(), the fts_info and fts_statp fields of the structure, when returned by fts_read(), will reflect the target of the symbolic link instead of the symbolic link itself. In either case, if the target of the symbolic link does not exist, the fields of the returned structure will be unchanged and the fts_info field will be set to FTS_SLNONE.
If the target of the link is a directory, the preorder return, followed by the return of all of its descendants, followed by a postorder return, is done.
FTS_SKIP
No descendants of this file are visited. The file may be one of those most recently returned by either fts_children() or fts_read().
fts_close()
The fts_close() function closes the file hierarchy stream referred to by ftsp and restores the current directory to the directory from which fts_open() was called to open ftsp. The fts_close() function returns 0 on success, and -1 if an error occurs.
ERRORS
The function fts_open() may fail and set errno for any of the errors specified for open(2) and malloc(3).
In addition, fts_open() may fail and set errno as follows:
ENOENT
Any element of path_argv was an empty string.
The function fts_close() may fail and set errno for any of the errors specified for chdir(2) and close(2).
The functions fts_read() and fts_children() may fail and set errno for any of the errors specified for chdir(2), malloc(3), opendir(3), readdir(3), and [l] stat(2).
In addition, fts_children(), fts_open(), and fts_set() may fail and set errno as follows:
EINVAL
options or instr was invalid.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
fts_open(), fts_set(), fts_close() | Thread safety | MT-Safe |
fts_read(), fts_children() | Thread safety | MT-Unsafe |
STANDARDS
None.
HISTORY
glibc 2. 4.4BSD.
BUGS
Before glibc 2.23, all of the APIs described in this man page are not safe when compiling a program using the LFS APIs (e.g., when compiling with -D_FILE_OFFSET_BITS=64).
SEE ALSO
find(1), chdir(2), lstat(2), stat(2), ftw(3), qsort(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
118 - Linux cli command sockaddr_in6type
NAME 🖥️ sockaddr_in6type 🖥️
socket address
LIBRARY
Standard C library (libc)
SYNOPSIS
#include <sys/socket.h>
struct sockaddr {
sa_family_t sa_family; /* Address family */
char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;
Internet domain sockets
#include <netinet/in.h>
struct sockaddr_in {
sa_family_t sin_family; /* AF_INET */
in_port_t sin_port; /* Port number */
struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
sa_family_t sin6_family; /* AF_INET6 */
in_port_t sin6_port; /* Port number */
uint32_t sin6_flowinfo; /* IPv6 flow info */
struct in6_addr sin6_addr; /* IPv6 address */
uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
in_addr_t s_addr;
};
struct in6_addr {
uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;
UNIX domain sockets
#include <sys/un.h>
struct sockaddr_un {
sa_family_t sun_family; /* Address family */
char sun_path[]; /* Socket pathname */
};
DESCRIPTION
sockaddr
Describes a socket address.
sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.
socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.
sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.
Internet domain sockets
sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.
sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.
UNIX domain sockets
sockaddr_un
Describes a UNIX domain socket address.
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001.
socklen_t was invented by POSIX. See also accept(2).
These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.
NOTES
socklen_t is also defined in <netdb.h>.
sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.
SEE ALSO
accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
119 - Linux cli command ts_close_restricted
NAME 🖥️ ts_close_restricted 🖥️
use a custom function for closing the touchscreen’s input device file
SYNOPSIS
#include <tslib.h>
"void(*ts_close_restricted)(intfd,void*user_data);
DESCRIPTION
ts_close_restricted() is useful if libts should not be run as root. If such a function is implemented by the user and assigned to the ts_close_restricted pointer, it will be called by ts_close() instead of the close() system call directly.
It should obviously close the device with file descriptor fd while user_data is currently unused.
SEE ALSO
ts_open_restricted(3), ts_open(3), ts_setup(3), ts_close(3), ts.conf(5)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
120 - Linux cli command xdrmem_create
NAME 🖥️ xdrmem_create 🖥️
library routines for external data representation
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS AND DESCRIPTION
These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.
The prototypes below are declared in <rpc/xdr.h> and make use of the following types:
typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);
For the declaration of the XDR type, see <rpc/xdr.h>.
bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
unsigned int maxsize, unsigned int elsize,
xdrproc_t elproc);
A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_bool(XDR *xdrs, bool_t *bp);
A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
unsigned int maxsize);
A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_char(XDR *xdrs, char *cp);
A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().
void xdr_destroy(XDR *xdrs);
A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.
bool_t xdr_double(XDR *xdrs, double *dp);
A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_enum(XDR *xdrs, enum_t *ep);
A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_float(XDR *xdrs, float *fp);
A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.
void xdr_free(xdrproc_t proc, char *objp);
Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).
unsigned int xdr_getpos(XDR *xdrs);
A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.
long *xdr_inline(XDR *xdrs, int len);
A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.
Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.
bool_t xdr_int(XDR *xdrs, int *ip);
A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_long(XDR *xdrs, long *lp);
A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.
void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
enum xdr_op op);
This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).
bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);
A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_pointer(XDR *xdrs, char **objpp,
unsigned int objsize, xdrproc_t xdrobj);
Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.
void xdrrec_create(XDR *xdrs, unsigned int sendsize,
unsigned int recvsize, char *handle,
int (*readit)(char *, char *, int),
int (*writeit)(char *, char *, int));
This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.
Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.
bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);
This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.
bool_t xdrrec_eof(XDR *xdrs);
This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.
bool_t xdrrec_skiprecord(XDR *xdrs);
This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
xdrproc_t proc);
A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.
Warning: this routine does not understand null pointers. Use xdr_pointer() instead.
xdr_setpos(XDR *xdrs, unsigned int pos);
A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.
Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.
bool_t xdr_short(XDR *xdrs, short *sp);
A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.
void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);
This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).
Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).
bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);
A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);
A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_u_int(XDR *xdrs, unsigned int *up);
A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);
A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);
A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
const struct xdr_discrim *choices,
xdrproc_t defaultarm); /* may equal NULL */
A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.
bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
unsigned int elsize, xdrproc_t elproc);
A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.
bool_t xdr_void(void);
This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.
bool_t xdr_wrapstring(XDR *xdrs, char **sp);
A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring() | Thread safety | MT-Safe |
SEE ALSO
rpc(3)
The following manuals:
eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
121 - Linux cli command zip_file_extra_fields_count_by_id
libzip (-lzip)
The
function counts the extra fields for the file at position
in the zip archive.
The following
are supported:
Count extra fields from the archive’s central directory.
Count extra fields from the local file headers.
Count the original unchanged extra fields, ignoring any changes made.
The
function counts the extra fields with ID (two-byte signature)
The other arguments are the same as for
Extra fields that are the same in the central directory and the local file header are merged into one. Therefore, the counts with
and
do not need to add up to the same value as when given
at the same time.
Upon successful completion, the requested number of extra fields is returned. Otherwise, -1 is returned and the error code in
is set to indicate the error.
and
fail if:
is not a valid file index in
and
were added in libzip 0.11.
and
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
122 - Linux cli command XtDispatchEvent
NAME 🖥️ XtDispatchEvent 🖥️
query and process events and input
SYNTAX
#include <X11/Intrinsic.h>
void XtAppNextEvent(XtAppContext app_context, XEvent *event_return);
Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return);
XtInputMask XtAppPending(XtAppContext app_context);
void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask);
Boolean XtDispatchEvent(XEvent *event);
void XtAppMainLoop(XtAppContext app_context);
ARGUMENTS
app_context
Specifies the application context that identifies the application.
event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.
event_return
Returns the event information to the specified event structure.
mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.
DESCRIPTION
If the X event queue is empty, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at the other input sources, timeout timeout values, and signal handlers and calling any callback procedures triggered by them. This wait time can be used for background processing (see Section 7.8).
If there is an event in the queue, XtAppPeekEvent fills in the event and returns a nonzero value. If no X input is on the queue, XtAppPeekEvent flushes the output buffer and blocks until input is available (possibly calling some timeout callbacks in the process). If the input is an event, XtAppPeekEvent fills in the event and returns a nonzero value. Otherwise, the input is for an alternate input source, and XtAppPeekEvent returns zero.
The XtAppPending function returns a nonzero value if there are events pending from the X server, timer pending, or other input sources pending. The value returned is a bit mask that is the OR of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal (see XtAppProcessEvent). If there are no events pending, XtAppPending flushes the output buffer and returns zero.
The XtAppProcessEvent function processes one timer, alternate input, signal source, or X event. If there is nothing of the appropriate type to process, XtAppProcessEvent blocks until there is. If there is more than one type of thing available to process, it is undefined which will get processed. Usually, this procedure is not called by client applications (see XtAppMainLoop). XtAppProcessEvent processes timer events by calling any appropriate timer callbacks, alternate input by calling any appropriate alternate input callbacks, signal source by calling any appropriate signal callbacks, and X events by calling XtDispatchEvent.
When an X event is received, it is passed to XtDispatchEvent, which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure. If there are no handlers for that event registered, the event is ignored and the dispatcher simply returns. The order in which the handlers are called is undefined.
The XtDispatchEvent function sends those events to the event handler functions that have been previously registered with the dispatch routine. XtDispatchEvent returns True if it dispatched the event to some handler and False if it found no handler to dispatch the event to. The most common use of XtDispatchEvent is to dispatch events acquired with the XtAppNextEvent procedure. However, it also can be used to dispatch user-constructed events. XtDispatchEvent also is responsible for implementing the grab semantics for XtAddGrab.
The XtAppMainLoop function processes events using XtAppProcessEvent, varying the mask parameter and using XtAppPending to ensure that it has a chance to handle events of all types, i.e., X events, timer events, input events and signal sources. This constitutes the main loop of X Toolkit applications, and, as such, it does not return unless XtAppSetExitFlag is called. Applications are expected to exit in response to some user action. There is nothing special about XtAppMainLoop; it is simply an loop that processes events until XtAppGetExitFlag() returns true.
Applications can provide their own version of this loop, which tests some global termination flag or tests that the number of top-level widgets is larger than zero before circling back for the next event.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
123 - Linux cli command gid_ttype
NAME 🖥️ gid_ttype 🖥️
process/user/group identifier
LIBRARY
Standard C library (libc)
SYNOPSIS
#include <sys/types.h>
typedef /* ... */ pid_t;
typedef /* ... */ uid_t;
typedef /* ... */ gid_t;
typedef /* ... */ id_t;
DESCRIPTION
pid_t is a type used for storing process IDs, process group IDs, and session IDs. It is a signed integer type.
uid_t is a type used to hold user IDs. It is an integer type.
gid_t is a type used to hold group IDs. It is an integer type.
id_t is a type used to hold a general identifier. It is an integer type that can be used to contain a pid_t, uid_t, or gid_t.
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001.
NOTES
The following headers also provide pid_t: <fcntl.h>, <sched.h>, <signal.h>, <spawn.h>, <sys/msg.h>, <sys/sem.h>, <sys/shm.h>, <sys/wait.h>, <termios.h>, <time.h>, <unistd.h>, and <utmpx.h>.
The following headers also provide uid_t: <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.
The following headers also provide gid_t: <grp.h>, <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.
The following header also provides id_t: <sys/resource.h>.
SEE ALSO
chown(2), fork(2), getegid(2), geteuid(2), getgid(2), getgroups(2), getpgid(2), getpid(2), getppid(2), getpriority(2), getpwnam(3), getresgid(2), getresuid(2), getsid(2), gettid(2), getuid(2), kill(2), pidfd_open(2), sched_setscheduler(2), waitid(2), getgrnam(3), sigqueue(3), credentials(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
124 - Linux cli command Net_DNS_RR_CDSpm
NAME 🖥️ Net_DNS_RR_CDSpm 🖥️
DNS CDS resource record
SYNOPSIS
use Net::DNS; $rr = Net::DNS::RR->new(name CDS keytag algorithm digtype digest);
DESCRIPTION
DNS Child DS resource record
This is a clone of the DS record and inherits all properties of the Net::DNS::RR::DS class.
Please see the Net::DNS::RR::DS perl documentation for details.
METHODS
The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.
Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.
COPYRIGHT
Copyright (c)2014,2017 Dick Franks
All rights reserved.
Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.
LICENSE
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SEE ALSO
perl Net::DNS Net::DNS::RR Net::DNS::RR::DS RFC7344 <https://tools.ietf.org/html/rfc7344>
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
125 - Linux cli command Regexp_Common_URI_RFC2396pm
NAME 🖥️ Regexp_Common_URI_RFC2396pm 🖥️
- Definitions from RFC2396;
SYNOPSIS
use Regexp::Common::URI::RFC2396 qw /:ALL/;
DESCRIPTION
This package exports definitions from RFC2396. It’s intended usage is for Regexp::Common::URI submodules only. Its interface might change without notice.
REFERENCES
[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.
AUTHOR
Damian Conway ([email protected])
MAINTENANCE
This package is maintained by Abigail ([email protected]).
BUGS AND IRRITATIONS
Bound to be plenty.
LICENSE and COPYRIGHT
This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.
This module is free software, and maybe used under any of the following licenses:
1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
126 - Linux cli command ts_get_eventpath
NAME 🖥️ ts_get_eventpath 🖥️
get the path to the currently opened touchscreen device file
SYNOPSIS
#include <tslib.h>
char *ts_get_eventpath(struct tsdev *tsdev);
DESCRIPTION
ts_get_eventpath() This function returns the path to the touchscreen device file that was opened with ts_open(). In case ts_setup() is used instead of ts_open() directly, it is often not known to the application in advance.
RETURN VALUE
This function returns the path to the touchscreen device file that was opened with ts_open(). It returns NULL in case of failure.
SEE ALSO
ts_setup(3), ts_read(3), ts.conf(5)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
127 - Linux cli command zip_error_clear
libzip (-lzip)
The
function clears the error state for the zip archive
The
function does the same for the zip file
and
were added in libzip 0.8.
and
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
128 - Linux cli command pthread_atfork
NAME 🖥️ pthread_atfork 🖥️
register fork handlers
LIBRARY
POSIX threads library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h>
int pthread_atfork(void (*prepare)(void), void (*parent)(void),
void (*child)(void));
DESCRIPTION
The pthread_atfork() function registers fork handlers that are to be executed when fork(2) is called by any thread in a process. The handlers are executed in the context of the thread that calls fork(2).
Three kinds of handler can be registered:
prepare specifies a handler that is executed in the parent process before fork(2) processing starts.
parent specifies a handler that is executed in the parent process after fork(2) processing completes.
child specifies a handler that is executed in the child process after fork(2) processing completes.
Any of the three arguments may be NULL if no handler is needed in the corresponding phase of fork(2) processing.
RETURN VALUE
On success, pthread_atfork() returns zero. On error, it returns an error number. pthread_atfork() may be called multiple times by a process to register additional handlers. The handlers for each phase are called in a specified order: the prepare handlers are called in reverse order of registration; the parent and child handlers are called in the order of registration.
ERRORS
ENOMEM
Could not allocate memory to record the fork handler list entry.
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001.
NOTES
When fork(2) is called in a multithreaded process, only the calling thread is duplicated in the child process. The original intention of pthread_atfork() was to allow the child process to be returned to a consistent state. For example, at the time of the call to fork(2), other threads may have locked mutexes that are visible in the user-space memory duplicated in the child. Such mutexes would never be unlocked, since the threads that placed the locks are not duplicated in the child. The intent of pthread_atfork() was to provide a mechanism whereby the application (or a library) could ensure that mutexes and other process and thread state would be restored to a consistent state. In practice, this task is generally too difficult to be practicable.
After a fork(2) in a multithreaded process returns in the child, the child should call only async-signal-safe functions (see signal-safety(7)) until such time as it calls execve(2) to execute a new program.
POSIX.1 specifies that pthread_atfork() shall not fail with the error EINTR.
SEE ALSO
fork(2), atexit(3), pthreads(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
129 - Linux cli command XtDatabase
NAME 🖥️ XtDatabase 🖥️
initialize, open, or close a display
SYNTAX
#include <X11/Intrinsic.h>
void XtDisplayInitialize(XtAppContext app_context, Display *display, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);
Display *XtOpenDisplay(XtAppContext app_context, const char *display_string, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);
void XtCloseDisplay(Display *display);
XrmDatabase XtDatabase(Display *display);
XrmDatabase XtScreenDatabase(Screen* screen);
ARGUMENTS
argc
Specifies a pointer to the number of command line parameters.
argv
Specifies the command line parameters.
app_context
Specifies the application context.
application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.
application_name
Specifies the name of the application instance.
display
Specifies the display. Note that a display can be in at most one application context.
num_options
Specifies the number of entries in the options list.
options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.
screen
Specifies the screen whose resource database is to be returned.
DESCRIPTION
The XtDisplayInitialize function builds the resource database, calls the Xlib XrmParseCommand function to parse the command line, and performs other per display initialization. After XrmParseCommand has been called, argc and argv contain only those parameters that were not in the standard option table or in the table specified by the options argument. If the modified argc is not zero, most applications simply print out the modified argv along with a message listing the allowable options. On UNIX-based systems, the application name is usually the final component of argv[0]. If the synchronize resource is True for the specified application, XtDisplayInitialize calls the Xlib XSynchronize function to put Xlib into synchronous mode for this display connection. If the reverseVideo resource is True, the Intrinsics exchange XtDefaultForeground and XtDefaultBackground for widgets created on this display. (See Section 9.6.1).
The XtOpenDisplay function calls XOpenDisplay the specified display name. If display_string is NULL, XtOpenDisplay uses the current value of the -display option specified in argv and if no display is specified in argv, uses the user’s default display (on UNIX-based systems, this is the value of the DISPLAY environment variable).
If this succeeds, it then calls XtDisplayInitialize and pass it the opened display and the value of the -name option specified in argv as the application name. If no name option is specified, it uses the application name passed to XtOpenDisplay. If the application name is NULL, it uses the last component of argv[0]. XtOpenDisplay returns the newly opened display or NULL if it failed.
XtOpenDisplay is provided as a convenience to the application programmer.
The XtCloseDisplay function closes the specified display as soon as it is safe to do so. If called from within an event dispatch (for example, a callback procedure), XtCloseDisplay does not close the display until the dispatch is complete. Note that applications need only call XtCloseDisplay if they are to continue executing after closing the display; otherwise, they should call XtDestroyApplicationContext or just exit.
The XtDatabase function returns the fully merged resource database that was built by XtDisplayInitialize associated with the display that was passed in. If this display has not been initialized by XtDisplayInitialize, the results are not defined.
The XtScreenDatabase function returns the fully merged resource database associated with the specified screen. If the screen does not belong to a Display initialized by XtDisplayInitialize, the results are undefined.
SEE ALSO
XtAppCreateShell(3), XtCreateApplicationContext(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
130 - Linux cli command strfromf
NAME 🖥️ strfromf 🖥️
convert a floating-point value into a string
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
int strfromd(char str[restrict .n], size_t n,
const char *restrict format, double fp);
int strfromf(char str[restrict .n], size_t n,
const char *restrict format, float fp);
int strfroml(char str[restrict .n], size_t n,
const char *restrict format, long double fp);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
strfromd(), strfromf(), strfroml():
__STDC_WANT_IEC_60559_BFP_EXT__
DESCRIPTION
These functions convert a floating-point value, fp, into a string of characters, str, with a configurable format string. At most n characters are stored into str.
The terminating null byte (‘�’) is written if and only if n is sufficiently large, otherwise the written string is truncated at n characters.
The strfromd(), strfromf(), and strfroml() functions are equivalent to
snprintf(str, n, format, fp);
except for the format string.
Format of the format string
The format string must start with the character ‘%’. This is followed by an optional precision which starts with the period character (.), followed by an optional decimal integer. If no integer is specified after the period character, a precision of zero is used. Finally, the format string should have one of the conversion specifiers a, A, e, E, f, F, g, or G.
The conversion specifier is applied based on the floating-point type indicated by the function suffix. Therefore, unlike snprintf(), the format string does not have a length modifier character. See snprintf(3) for a detailed description of these conversion specifiers.
The implementation conforms to the C99 standard on conversion of NaN and infinity values:
If fp is a NaN, +NaN, or -NaN, and f (or a, e, g) is the conversion specifier, the conversion is to “nan”, “nan”, or “-nan”, respectively. If F (or A, E, G) is the conversion specifier, the conversion is to “NAN” or “-NAN”.
Likewise if fp is infinity, it is converted to [-]inf or [-]INF.
A malformed format string results in undefined behavior.
RETURN VALUE
The strfromd(), strfromf(), and strfroml() functions return the number of characters that would have been written in str if n had enough space, not counting the terminating null byte. Thus, a return value of n or greater means that the output was truncated.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7) and the POSIX Safety Concepts section in GNU C Library manual.
Interface | Attribute | Value |
strfromd(), strfromf(), strfroml() | Thread safety | MT-Safe locale |
Async-signal safety | AS-Unsafe heap | |
Async-cancel safety | AC-Unsafe mem |
Note: these attributes are preliminary.
STANDARDS
ISO/IEC TS 18661-1.
VERSIONS
strfromd()
strfromf()
strfroml()
glibc 2.25.
NOTES
These functions take account of the LC_NUMERIC category of the current locale.
EXAMPLES
To convert the value 12.1 as a float type to a string using decimal notation, resulting in “12.100000”:
#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromf(s, ssize, "%f", 12.1);
To convert the value 12.3456 as a float type to a string using decimal notation with two digits of precision, resulting in “12.35”:
#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromf(s, ssize, "%.2f", 12.3456);
To convert the value 12.345e19 as a double type to a string using scientific notation with zero digits of precision, resulting in “1E+20”:
#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromd(s, ssize, "%.E", 12.345e19);
SEE ALSO
atof(3), snprintf(3), strtod(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
131 - Linux cli command getrpcport
NAME 🖥️ getrpcport 🖥️
get RPC port number
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <rpc/rpc.h>
int getrpcport(const char *host, unsigned long prognum,
unsigned long versnum, unsigned int proto);
DESCRIPTION
getrpcport() returns the port number for version versnum of the RPC program prognum running on host and using protocol proto. It returns 0 if it cannot contact the portmapper, or if prognum is not registered. If prognum is registered but not with version versnum, it will still return a port number (for some version of the program) indicating that the program is indeed registered. The version mismatch will be detected upon the first call to the service.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
getrpcport() | Thread safety | MT-Safe env locale |
STANDARDS
BSD.
HISTORY
BSD, Solaris.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
132 - Linux cli command pcap_set_buffer_sizepcap
NAME 🖥️ pcap_set_buffer_sizepcap 🖥️
set the buffer size for a not-yet-activated capture handle
SYNOPSIS
#include <pcap/pcap.h>
int pcap_set_buffer_size(pcap_t *p, int buffer_size);
DESCRIPTION
pcap_set_buffer_size() sets the buffer size that will be used on a capture handle when the handle is activated to buffer_size, which is in units of bytes.
RETURN VALUE
pcap_set_buffer_size() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.
SEE ALSO
pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
133 - Linux cli command Net_RawIP_libpcappm
NAME 🖥️ Net_RawIP_libpcappm 🖥️
An interface to libpcap in Net::RawIP(3pm)
DESCRIPTION
Function The input parameters The output parameters open_live a network Return value is a pcap_t* device(eth0,ppp0,…); If retval less than zero a snap length; then $err filled with a promisc - boolean; an error string. a timeout in sec; $err is an undef scalar; open_offline a filename which is filled Return value is pcap_t* with a raw output of dump; If retval less than zero $err is an unfef scalar; then $err filled with an error string. dump_open pcap_t*; Return value is a FILE* $err; lookupdev $err; Return value is a name of first device which is found by libpcap lookupnet a network device; a netnumber; a netnumer is undef; a netmask; a netmask is undef; If retval less than zero $err is undef; then $err filled with an error string. dispatch a scalar with pcap_t*; No output parameters. number of packets for proce- ssing; reference to the perl call- back,this callback will be called with 3 parameters: $_[0] is fourth parameter from dispatch, $_[1] is a scalar with struc- ture pcap_pkthdr for a current packet, $_[2] is a scalar with a current packet; fourth parameter could be an array or a hash reference or a pointer (FILE*) returned by dump_open,it can be unre- ferenced in the perl call- back or be used as a perl filehandle in that callback. loop As for dispatch. As for dispatch. dump As for a perl callback No output. but $_[0] must be a pointer (FILE*) only. compile a scalar with pcap_t*; a scalar with bpf_program. a bpf_program is undef; If retval is less than zero a scalar with filter string; then there was a problem with a boolean value (optimize or filter grammar. not); a scalar with netmask; setfilter a scalar with pcap_t*; If retval is less than zero a scalar with bpf_program then there was a problem while returned by compile. settting filter. next a scalar with pcap_t*; A scalar with next packet; a scalar with with struc- a scalar with with structure ture pcap_pkthdr for a current pcap_pkthdr also will be modi packet,originally is undef. filed for an every packet and it can be accessed but for read only. datalink a scalar with pcap_t*; Retval is the link layer type, e.g. DLT_EN10MB. snapshot a scalar with pcap_t*; Retval is the snapshot length specified when open_live was called. is_swapped a scalar with pcap_t*; returns true if the current savefile uses a different byte order than the current system. major_version a scalar with pcap_t*; returns the major number of the version of the pcap used to write the savefile. minor_version a scalar with pcap_t*; returns the minor number of the version of the pcap used to write the savefile. file a scalar with pcap_t*; returns the name of the savefile. stats a scalar with pcap_t*; If retval 0 then a scalar a scalar with structure with structure pcap_stat will pcap_stat,originally undef be filled with the packet statistics. fileno a scalar with pcap_t*; returns the file descriptor number of the savefile. A core perl function is available as CORE::fileno. geterr a scalar with pcap_t*; returns the error text pertaining to the last pcap library error. perror a scalar with pcap_t*; prints the text of the last a scalar with prefix; pcap library error on stderr, prefixed by prefix. close a scalar with pcap_t*; closes the files associated with pcap_t* and deallocates resources. A core perl function is available as CORE::close. dump_close a scalar with pcap_t*; closes the savefile.
AUTHOR
Sergey Kolychev <[email protected]>
SEE ALSO
Net::RawIP (3pm),pcap (3).
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
134 - Linux cli command strtoq
NAME 🖥️ strtoq 🖥️
convert a string to a long integer
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
long strtol(const char *restrict nptr,
char **restrict endptr, int base);
long long strtoll(const char *restrict nptr,
char **restrict endptr, int base);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
strtoll():
_ISOC99_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
DESCRIPTION
The strtol() function converts the initial part of the string in nptr to a long integer value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.
The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional ‘+’ or ‘-’ sign. If base is zero or 16, the string may then include a “0x” or “0X” prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is ‘0’, in which case it is taken as 8 (octal).
The remainder of the string is converted to a long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter ‘A’ in either uppercase or lowercase represents 10, ‘B’ represents 11, and so forth, with ‘Z’ representing 35.)
If endptr is not NULL, and the base is supported, strtol() stores the address of the first invalid character in *endptr. If there were no digits at all, strtol() stores the original value of nptr in *endptr (and returns 0). In particular, if *nptr is not ‘�’ but **endptr is ‘�’ on return, the entire string is valid.
The strtoll() function works just like the strtol() function but returns a long long integer value.
RETURN VALUE
The strtol() function returns the result of the conversion, unless the value would underflow or overflow. If an underflow occurs, strtol() returns LONG_MIN. If an overflow occurs, strtol() returns LONG_MAX. In both cases, errno is set to ERANGE. Precisely the same holds for strtoll() (with LLONG_MIN and LLONG_MAX instead of LONG_MIN and LONG_MAX).
ERRORS
This function does not modify errno on success.
EINVAL
(not in C99) The given base contains an unsupported value.
ERANGE
The resulting value was out of range.
The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned).
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
strtol(), strtoll(), strtoq() | Thread safety | MT-Safe locale |
STANDARDS
C11, POSIX.1-2008.
HISTORY
strtol()
POSIX.1-2001, C89, SVr4, 4.3BSD.
strtoll()
POSIX.1-2001, C99.
NOTES
Since strtol() can legitimately return 0, LONG_MAX, or LONG_MIN (LLONG_MAX or LLONG_MIN for strtoll()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno == ERANGE after the call.
According to POSIX.1, in locales other than “C” and “POSIX”, these functions may accept other, implementation-defined numeric strings.
BSD also has
quad_t strtoq(const char *nptr, char **endptr, int base);
with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to strtoll() or to strtol().
CAVEATS
If the base needs to be tested, it should be tested in a call where the string is known to succeed. Otherwise, it’s impossible to portably differentiate the errors.
errno = 0;
strtol("0", NULL, base);
if (errno == EINVAL)
goto unsupported_base;
EXAMPLES
The program shown below demonstrates the use of strtol(). The first command-line argument specifies a string from which strtol() should parse a number. The second (optional) argument specifies the base to be used for the conversion. (This argument is converted to numeric form using atoi(3), a function that performs no error checking and has a simpler interface than strtol().) Some examples of the results produced by this program are the following:
$ ./a.out 123
strtol() returned 123
$ ./a.out ' 123'
strtol() returned 123
$ ./a.out 123abc
strtol() returned 123
Further characters after number: "abc"
$ ./a.out 123abc 55
strtol: Invalid argument
$ ./a.out ''
No digits were found
$ ./a.out 4000000000
strtol: Numerical result out of range
Program source
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
int base;
char *endptr, *str;
long val;
if (argc < 2) {
fprintf(stderr, "Usage: %s str [base]
“, argv[0]); exit(EXIT_FAILURE); } str = argv[1]; base = (argc > 2) ? atoi(argv[2]) : 0; errno = 0; /* To distinguish success/failure after call / strtol(“0”, NULL, base); if (errno == EINVAL) { perror(“strtol”); exit(EXIT_FAILURE); } errno = 0; / To distinguish success/failure after call / val = strtol(str, &endptr, base); / Check for various possible errors. / if (errno == ERANGE) { perror(“strtol”); exit(EXIT_FAILURE); } if (endptr == str) { fprintf(stderr, “No digits were found “); exit(EXIT_FAILURE); } / If we got here, strtol() successfully parsed a number. */ printf(“strtol() returned %ld “, val); if (endptr != ‘�’) / Not necessarily an error… */ printf(“Further characters after number: "%s" “, endptr); exit(EXIT_SUCCESS); }
SEE ALSO
atof(3), atoi(3), atol(3), strtod(3), strtoimax(3), strtoul(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
135 - Linux cli command HTML_TreeBuilderpm
NAME 🖥️ HTML_TreeBuilderpm 🖥️
Parser that builds a HTML syntax tree
VERSION
This document describes version 5.07 of HTML::TreeBuilder, released August 31, 2017 as part of HTML-Tree.
SYNOPSIS
use HTML::TreeBuilder 5 -weak; # Ensure weak references in use foreach my $file_name (@ARGV) { my $tree = HTML::TreeBuilder->new; # empty tree $tree->parse_file($file_name); print “Hey, heres a dump of the parse tree of $file_name: “; $tree->dump; # a method we inherit from HTML::Element print “And here it is, bizarrely rerendered as HTML: “, $tree->as_HTML, " “; # Now that were done with it, we must destroy it. # $tree = $tree->delete; # Not required with weak references }
DESCRIPTION
(This class is part of the HTML::Tree dist.)
This class is for HTML syntax trees that get built out of HTML source. The way to use it is to:
1. start a new (empty) HTML::TreeBuilder object,
2. then use one of the methods from HTML::Parser (presumably with $tree->parse_file($filename)
for files, or with $tree->parse($document_content)
and $tree->eof
if you’ve got the content in a string) to parse the HTML document into the tree $tree
.
(You can combine steps 1 and 2 with the new_from_file or new_from_content methods.)
2b. call $root->elementify()
if you want.
3. do whatever you need to do with the syntax tree, presumably involving traversing it looking for some bit of information in it,
4. previous versions of HTML::TreeBuilder required you to call $tree->delete()
to erase the contents of the tree from memory when you’re done with the tree. This is not normally required anymore. See Weak References in HTML::Element for details.
ATTRIBUTES
Most of the following attributes native to HTML::TreeBuilder control how parsing takes place; they should be set before you try parsing into the given object. You can set the attributes by passing a TRUE or FALSE value as argument. E.g., $root->implicit_tags
returns the current setting for the implicit_tags
option, $root->implicit_tags(1)
turns that option on, and $root->implicit_tags(0)
turns it off.
implicit_tags
Setting this attribute to true will instruct the parser to try to deduce implicit elements and implicit end tags. If it is false you get a parse tree that just reflects the text as it stands, which is unlikely to be useful for anything but quick and dirty parsing. (In fact, I’d be curious to hear from anyone who finds it useful to have implicit_tags
set to false.) Default is true.
Implicit elements have the implicit in HTML::Element attribute set.
implicit_body_p_tag
This controls an aspect of implicit element behavior, if implicit_tags
is on: If a text element (PCDATA) or a phrasal element (such as <em>
) is to be inserted under <body>
, two things can happen: if implicit_body_p_tag
is true, it’s placed under a new, implicit <p>
tag. (Past DTDs suggested this was the only correct behavior, and this is how past versions of this module behaved.) But if implicit_body_p_tag
is false, nothing is implicated Ω- the PCDATA or phrasal element is simply placed under <body>
. Default is false.
no_expand_entities
This attribute controls whether entities are decoded during the initial parse of the source. Enable this if you don’t want entities decoded to their character value. e.g. ‘&’ is decoded to ‘&’ by default, but will be unchanged if this is enabled. Default is false (entities will be decoded.)
ignore_unknown
This attribute controls whether unknown tags should be represented as elements in the parse tree, or whether they should be ignored. Default is true (to ignore unknown tags.)
ignore_text
Do not represent the text content of elements. This saves space if all you want is to examine the structure of the document. Default is false.
ignore_ignorable_whitespace
If set to true, TreeBuilder will try to avoid creating ignorable whitespace text nodes in the tree. Default is true. (In fact, I’d be interested in hearing if there’s ever a case where you need this off, or where leaving it on leads to incorrect behavior.)
no_space_compacting
This determines whether TreeBuilder compacts all whitespace strings in the document (well, outside of PRE or TEXTAREA elements), or leaves them alone. Normally (default, value of 0), each string of contiguous whitespace in the document is turned into a single space. But that’s not done if no_space_compacting
is set to 1.
Setting no_space_compacting
to 1 might be useful if you want to read in a tree just to make some minor changes to it before writing it back out.
This method is experimental. If you use it, be sure to report any problems you might have with it.
p_strict
If set to true (and it defaults to false), TreeBuilder will take a narrower than normal view of what can be under a <p>
element; if it sees a non-phrasal element about to be inserted under a <p>
, it will close that <p>
. Otherwise it will close <p>
elements only for other <p>
’s, headings, and <form>
(although the latter may be removed in future versions).
For example, when going thru this snippet of code,
<p>stuff <ul>
TreeBuilder will normally (with p_strict
false) put the <ul>
element under the <p>
element. However, with p_strict
set to true, it will close the <p>
first.
In theory, there should be strictness options like this for other/all elements besides just <p>
; but I treat this as a special case simply because of the fact that <p>
occurs so frequently and its end-tag is omitted so often; and also because application of strictness rules at parse-time across all elements often makes tiny errors in HTML coding produce drastically bad parse-trees, in my experience.
If you find that you wish you had an option like this to enforce content-models on all elements, then I suggest that what you want is content-model checking as a stage after TreeBuilder has finished parsing.
store_comments
This determines whether TreeBuilder will normally store comments found while parsing content into $root
. Currently, this is off by default.
store_declarations
This determines whether TreeBuilder will normally store markup declarations found while parsing content into $root
. This is on by default.
store_pis
This determines whether TreeBuilder will normally store processing instructions found while parsing content into $root
Ω- assuming a recent version of HTML::Parser (old versions won’t parse PIs correctly). Currently, this is off (false) by default.
It is somewhat of a known bug (to be fixed one of these days, if anyone needs it?) that PIs in the preamble (before the <html>
start-tag) end up actually under the <html>
element.
warn
This determines whether syntax errors during parsing should generate warnings, emitted via Perl’s warn
function.
This is off (false) by default.
METHODS
Objects of this class inherit the methods of both HTML::Parser and HTML::Element. The methods inherited from HTML::Parser are used for building the HTML tree, and the methods inherited from HTML::Element are what you use to scrutinize the tree. Besides this (HTML::TreeBuilder) documentation, you must also carefully read the HTML::Element documentation, and also skim the HTML::Parser documentation Ω- probably only its parse and parse_file methods are of interest.
new_from_file
$root = HTML::TreeBuilder->new_from_file($filename_or_filehandle);
This shortcut constructor merely combines constructing a new object (with the new method, below), and calling $new->parse_file(...)
on it. Returns the new object. Note that this provides no way of setting any parse options like store_comments
(for that, call new
, and then set options, before calling parse_file
). See the notes (below) on parameters to parse_file.
If HTML::TreeBuilder is unable to read the file, then new_from_file
dies. The error can also be found in $!
. (This behavior is new in HTML-Tree 5. Previous versions returned a tree with only implicit elements.)
new_from_content
$root = HTML::TreeBuilder->new_from_content(…);
This shortcut constructor merely combines constructing a new object (with the new method, below), and calling for(...){$new->parse($_)}
and $new->eof
on it. Returns the new object. Note that this provides no way of setting any parse options like store_comments
(for that, call new
, and then set options, before calling parse
). Example usages: HTML::TreeBuilder->new_from_content(@lines)
, or HTML::TreeBuilder->new_from_content($content)
.
new_from_url
$root = HTML::TreeBuilder->new_from_url($url)
This shortcut constructor combines constructing a new object (with the new method, below), loading LWP::UserAgent, fetching the specified URL, and calling $new->parse( $response->decoded_content)
and $new->eof
on it. Returns the new object. Note that this provides no way of setting any parse options like store_comments
.
If LWP is unable to fetch the URL, or the response is not HTML (as determined by content_is_html in HTTP::Headers), then new_from_url
dies, and the HTTP::Response object is found in $HTML::TreeBuilder::lwp_response
.
You must have installed LWP::UserAgent for this method to work. LWP is not installed automatically, because it’s a large set of modules and you might not need it.
new
$root = HTML::TreeBuilder->new();
This creates a new HTML::TreeBuilder object. This method takes no attributes.
parse_file
$root->parse_file(…)
[An important method inherited from HTML::Parser, which see. Current versions of HTML::Parser can take a filespec, or a filehandle object, like *FOO, or some object from class IO::Handle, IO::File, IO::Socket) or the like. I think you should check that a given file exists before calling $root->parse_file($filespec)
.]
When you pass a filename to parse_file
, HTML::Parser opens it in binary mode, which means it’s interpreted as Latin-1 (ISO-8859-1). If the file is in another encoding, like UTF-8 or UTF-16, this will not do the right thing.
One solution is to open the file yourself using the proper :encoding
layer, and pass the filehandle to parse_file
. You can automate this process by using html_file in IO::HTML, which will use the HTML5 encoding sniffing algorithm to automatically determine the proper :encoding
layer and apply it.
In the next major release of HTML-Tree, I plan to have it use IO::HTML automatically. If you really want your file opened in binary mode, you should open it yourself and pass the filehandle to parse_file
.
The return value is undef
if there’s an error opening the file. In that case, the error will be in $!
.
parse
$root->parse(…)
[A important method inherited from HTML::Parser, which see. See the note below for $root->eof()
.]
eof
$root->eof();
This signals that you’re finished parsing content into this tree; this runs various kinds of crucial cleanup on the tree. This is called for you when you call $root->parse_file(...)
, but not when you call $root->parse(...)
. So if you call $root->parse(...)
, then you must call $root->eof()
once you’ve finished feeding all the chunks to parse(...)
, and before you actually start doing anything else with the tree in $root
.
parse_content
$root->parse_content(…);
Basically a handy alias for $root->parse(...); $root->eof
. Takes the exact same arguments as $root->parse()
.
delete
$root->delete();
[A previously important method inherited from HTML::Element, which see.]
elementify
$root->elementify();
This changes the class of the object in $root
from HTML::TreeBuilder to the class used for all the rest of the elements in that tree (generally HTML::Element). Returns $root
.
For most purposes, this is unnecessary, but if you call this after (after!!) you’ve finished building a tree, then it keeps you from accidentally trying to call anything but HTML::Element methods on it. (I.e., if you accidentally call $root->parse_file(...)
on the already-complete and elementified tree, then instead of charging ahead and wreaking havoc, it’ll throw a fatal error Ω- since $root
is now an object just of class HTML::Element which has no parse_file
method.
Note that elementify
currently deletes all the private attributes of $root
except for _tag, _parent, _content, _pos, and _implicit. If anyone requests that I change this to leave in yet more private attributes, I might do so, in future versions.
guts
@nodes = $root->guts(); $parent_for_nodes = $root->guts();
In list context (as in the first case), this method returns the topmost non-implicit nodes in a tree. This is useful when you’re parsing HTML code that you know doesn’t expect an HTML document, but instead just a fragment of an HTML document. For example, if you wanted the parse tree for a file consisting of just this:
<li>I like pie!
Then you would get that with @nodes = $root->guts();
. It so happens that in this case, @nodes
will contain just one element object, representing the <li>
node (with I like pie! being its text child node). However, consider if you were parsing this:
<hr>Hooboy!<hr>
In that case, $root->guts()
would return three items: an element object for the first <hr>
, a text string Hooboy!, and another <hr>
element object.
For cases where you want definitely one element (so you can treat it as a document fragment, roughly speaking), call guts()
in scalar context, as in $parent_for_nodes = $root->guts()
. That works like guts()
in list context; in fact, guts()
in list context would have returned exactly one value, and if it would have been an object (as opposed to a text string), then that’s what guts
in scalar context will return. Otherwise, if guts()
in list context would have returned no values at all, then guts()
in scalar context returns undef. In all other cases, guts()
in scalar context returns an implicit <div>
element node, with children consisting of whatever nodes guts()
in list context would have returned. Note that that may detach those nodes from $root
’s tree.
disembowel
@nodes = $root->disembowel(); $parent_for_nodes = $root->disembowel();
The disembowel()
method works just like the guts()
method, except that disembowel definitively destroys the tree above the nodes that are returned. Usually when you want the guts from a tree, you’re just going to toss out the rest of the tree anyway, so this saves you the bother. (Remember, disembowel means remove the guts from.)
INTERNAL METHODS
You should not need to call any of the following methods directly.
element_class
$classname = $h->element_class;
This method returns the class which will be used for new elements. It defaults to HTML::Element, but can be overridden by subclassing or esoteric means best left to those will will read the source and then not complain when those esoteric means change. (Just subclass.)
comment
Accept a here’s a comment signal from HTML::Parser.
declaration
Accept a here’s a markup declaration signal from HTML::Parser.
done
TODO: document
end
Either: Accept an end-tag signal from HTML::Parser Or: Method for closing currently open elements in some fairly complex way, as used by other methods in this class.
TODO: Why is this hidden?
process
Accept a here’s a PI signal from HTML::Parser.
start
Accept a signal from HTML::Parser for start-tags.
TODO: Why is this hidden?
stunt
TODO: document
stunted
TODO: document
text
Accept a here’s a text token signal from HTML::Parser.
TODO: Why is this hidden?
tighten_up
Legacy
Redirects to delete_ignorable_whitespace in HTML::Element.
warning
Wrapper for CORE::warn
TODO: why not just use carp?
SUBROUTINES
DEBUG
Are we in Debug mode? This is a constant subroutine, to allow compile-time optimizations. To control debug mode, set $HTML::TreeBuilder::DEBUG
before loading HTML::TreeBuilder.
HTML AND ITS DISCONTENTS
HTML is rather harder to parse than people who write it generally suspect.
Here’s the problem: HTML is a kind of SGML that permits minimization and implication. In short, this means that you don’t have to close every tag you open (because the opening of a subsequent tag may implicitly close it), and if you use a tag that can’t occur in the context you seem to using it in, under certain conditions the parser will be able to realize you mean to leave the current context and enter the new one, that being the only one that your code could correctly be interpreted in.
Now, this would all work flawlessly and unproblematically if: 1) all the rules that both prescribe and describe HTML were (and had been) clearly set out, and 2) everyone was aware of these rules and wrote their code in compliance to them.
However, it didn’t happen that way, and so most HTML pages are difficult if not impossible to correctly parse with nearly any set of straightforward SGML rules. That’s why the internals of HTML::TreeBuilder consist of lots and lots of special cases Ω- instead of being just a generic SGML parser with HTML DTD rules plugged in.
TRANSLATIONS?
The techniques that HTML::TreeBuilder uses to perform what I consider very robust parses on everyday code are not things that can work only in Perl. To date, the algorithms at the center of HTML::TreeBuilder have been implemented only in Perl, as far as I know; and I don’t foresee getting around to implementing them in any other language any time soon.
If, however, anyone is looking for a semester project for an applied programming class (or if they merely enjoy extra-curricular masochism), they might do well to see about choosing as a topic the implementation/adaptation of these routines to any other interesting programming language that you feel currently suffers from a lack of robust HTML-parsing. I welcome correspondence on this subject, and point out that one can learn a great deal about languages by trying to translate between them, and then comparing the result.
The HTML::TreeBuilder source may seem long and complex, but it is rather well commented, and symbol names are generally self-explanatory. (You are encouraged to read the Mozilla HTML parser source for comparison.) Some of the complexity comes from little-used features, and some of it comes from having the HTML tokenizer (HTML::Parser) being a separate module, requiring somewhat of a different interface than you’d find in a combined tokenizer and tree-builder. But most of the length of the source comes from the fact that it’s essentially a long list of special cases, with lots and lots of sanity-checking, and sanity-recovery Ω- because, as Roseanne Rosannadanna once said, “it’s always something”.
Users looking to compare several HTML parsers should look at the source for Raggett’s Tidy (<http://www.w3.org/People/Raggett/tidy/>
), Mozilla (<http://www.mozilla.org/>
), and possibly root around the browsers section of Yahoo to find the various open-source ones (<http://dir.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Browsers/>
).
BUGS
* Framesets seem to work correctly now. Email me if you get a strange parse from a document with framesets.
* Really bad HTML code will, often as not, make for a somewhat objectionable parse tree. Regrettable, but unavoidably true.
* If you’re running with implicit_tags
off (God help you!), consider that $tree->content_list
probably contains the tree or grove from the parse, and not $tree
itself (which will, oddly enough, be an implicit <html>
element). This seems counter-intuitive and problematic; but seeing as how almost no HTML ever parses correctly with implicit_tags
off, this interface oddity seems the least of your problems.
BUG REPORTS
When a document parses in a way different from how you think it should, I ask that you report this to me as a bug. The first thing you should do is copy the document, trim out as much of it as you can while still producing the bug in question, and then email me that mini-document and the code you’re using to parse it, to the HTML::Tree bug queue at <bug-html-tree at rt.cpan.org>
.
Include a note as to how it parses (presumably including its $tree->dump
output), and then a careful and clear explanation of where you think the parser is going astray, and how you would prefer that it work instead.
SEE ALSO
For more information about the HTML-Tree distribution: HTML::Tree.
Modules used by HTML::TreeBuilder: HTML::Parser, HTML::Element, HTML::Tagset.
For converting between XML::DOM::Node, HTML::Element, and XML::Element trees: HTML::DOMbo.
For opening a HTML file with automatic charset detection: IO::HTML.
AUTHOR
Current maintainers:
Christopher J. Madsen
<perl AT cjmweb.net>
Jeff Fearn
<jfearn AT cpan.org>
Original HTML-Tree author:
- Gisle Aas
Former maintainers:
Sean M. Burke
Andy Lester
Pete Krawczyk
<petek AT cpan.org>
You can follow or contribute to HTML-Tree’s development at <https://github.com/kentfredric/HTML-Tree>.
COPYRIGHT AND LICENSE
Copyright 1995-1998 Gisle Aas, 1999-2004 Sean M. Burke, 2005 Andy Lester, 2006 Pete Krawczyk, 2010 Jeff Fearn, 2012 Christopher J. Madsen.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The programs in this library are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
136 - Linux cli command XShapeQueryExtents
NAME 🖥️ XShapeQueryExtents 🖥️
X nonrectangular shape functions
SYNTAX
#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
Display *dpy,
int *event_basep,
int *error_basep);
Status XShapeQueryVersion (
Display *dpy,
int *major_versionp,
int *minor_versionp);
void XShapeCombineRegion (
Display *dpy,
Window dest,
int destKind,
int xOff,
int yOff,
struct _XRegion *r,
int op);
void XShapeCombineRectangles (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
XRectangle *rects,
int n_rects,
int op,
int ordering);
void XShapeCombineMask (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
Pixmap src,
int op);
void XShapeCombineShape (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
Pixmap src,
int srcKind,
int op);
void XShapeOffsetShape (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff);
Status XShapeQueryExtents (
Display *dpy,
Window window,
int *bShaped,
int *xbs,
int *ybs,
unsigned int *wbs,
unsigned int *hbs,
int *cShaped,
int *xcs,
int *ycs,
unsigned int *wcs,
unsigned int *hcs);
void XShapeSelectInput (
Display *dpy,
Window window,
unsigned longmask);
unsigned long XShapeInputSelected (
Display *dpy,
Window window);
XRectangle *XShapeGetRectangles (
Display *dpy,
Window window,
int kind,
int *count,
int *ordering);
STRUCTURES
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* window of event */
int kind; /* ShapeBounding or ShapeClip */
int x, y; /* extents of new region */
unsigned width, height;
Time time; /* server timestamp when region changed */
Bool shaped; /* true if the region exists */
} XShapeEvent;
DESCRIPTION
The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.
PREDEFINED VALUES
Operations:
ShapeSet ShapeUnion ShapeIntersect ShapeSubtract ShapeInvert
Shape Kinds:
ShapeBounding ShapeClip
Event defines:
ShapeNotifyMask ShapeNotify
BUGS
This manual page needs a lot more work.
SEE ALSO
X11 Nonrectangular Window Shape Extension
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
137 - Linux cli command pthread_join
NAME 🖥️ pthread_join 🖥️
join with a terminated thread
LIBRARY
POSIX threads library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h>
int pthread_join(pthread_t thread, void **retval);
DESCRIPTION
The pthread_join() function waits for the thread specified by thread to terminate. If that thread has already terminated, then pthread_join() returns immediately. The thread specified by thread must be joinable.
If retval is not NULL, then pthread_join() copies the exit status of the target thread (i.e., the value that the target thread supplied to pthread_exit(3)) into the location pointed to by retval. If the target thread was canceled, then PTHREAD_CANCELED is placed in the location pointed to by retval.
If multiple threads simultaneously try to join with the same thread, the results are undefined. If the thread calling pthread_join() is canceled, then the target thread will remain joinable (i.e., it will not be detached).
RETURN VALUE
On success, pthread_join() returns 0; on error, it returns an error number.
ERRORS
EDEADLK
A deadlock was detected (e.g., two threads tried to join with each other); or thread specifies the calling thread.
EINVAL
thread is not a joinable thread.
EINVAL
Another thread is already waiting to join with this thread.
ESRCH
No thread with the ID thread could be found.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
pthread_join() | Thread safety | MT-Safe |
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001.
NOTES
After a successful call to pthread_join(), the caller is guaranteed that the target thread has terminated. The caller may then choose to do any clean-up that is required after termination of the thread (e.g., freeing memory or other resources that were allocated to the target thread).
Joining with a thread that has previously been joined results in undefined behavior.
Failure to join with a thread that is joinable (i.e., one that is not detached), produces a “zombie thread”. Avoid doing this, since each zombie thread consumes some system resources, and when enough zombie threads have accumulated, it will no longer be possible to create new threads (or processes).
There is no pthreads analog of waitpid(-1, &status, 0), that is, “join with any terminated thread”. If you believe you need this functionality, you probably need to rethink your application design.
All of the threads in a process are peers: any thread can join with any other thread in the process.
EXAMPLES
See pthread_create(3).
SEE ALSO
pthread_cancel(3), pthread_create(3), pthread_detach(3), pthread_exit(3), pthread_tryjoin_np(3), pthreads(7)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
138 - Linux cli command random
NAME 🖥️ random 🖥️
random number generator
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
long random(void);
void srandom(unsigned int seed);
char *initstate(unsigned int seed, char state[.n], size_t n);
char *setstate(char *state);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
random(), srandom(), initstate(), setstate():
_XOPEN_SOURCE >= 500
|| /* glibc >= 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
DESCRIPTION
The random() function uses a nonlinear additive feedback random number generator employing a default table of size 31 long integers to return successive pseudo-random numbers in the range from 0 to 2^31 - 1. The period of this random number generator is very large, approximately 16 * ((2^31) - 1).
The srandom() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by random(). These sequences are repeatable by calling srandom() with the same seed value. If no seed value is provided, the random() function is automatically seeded with a value of 1.
The initstate() function allows a state array state to be initialized for use by random(). The size of the state array n is used by initstate() to decide how sophisticated a random number generator it should use—the larger the state array, the better the random numbers will be. Current “optimal” values for the size of the state array n are 8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to the nearest known amount. Using less than 8 bytes results in an error. seed is the seed for the initialization, which specifies a starting point for the random number sequence, and provides for restarting at the same point.
The setstate() function changes the state array used by the random() function. The state array state is used for random number generation until the next call to initstate() or setstate(). state must first have been initialized using initstate() or be the result of a previous call of setstate().
RETURN VALUE
The random() function returns a value between 0 and (2^31) - 1. The srandom() function returns no value.
The initstate() function returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.
On success, setstate() returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.
ERRORS
EINVAL
The state argument given to setstate() was NULL.
EINVAL
A state array of less than 8 bytes was specified to initstate().
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
random(), srandom(), initstate(), setstate() | Thread safety | MT-Safe |
STANDARDS
POSIX.1-2008.
HISTORY
POSIX.1-2001, 4.3BSD.
NOTES
Random-number generation is a complex topic. Numerical Recipes in C: The Art of Scientific Computing (William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) provides an excellent discussion of practical random-number generation issues in Chapter 7 (Random Numbers).
For a more theoretical discussion which also covers many practical issues in depth, see Chapter 3 (Random Numbers) in Donald E. Knuth’s The Art of Computer Programming, volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts: Addison-Wesley Publishing Company, 1981.
CAVEATS
The random() function should not be used in multithreaded programs where reproducible behavior is required. Use random_r(3) for that purpose.
BUGS
According to POSIX, initstate() should return NULL on error. In the glibc implementation, errno is (as specified) set on error, but the function does not return NULL.
SEE ALSO
getrandom(2), drand48(3), rand(3), random_r(3), srand(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
139 - Linux cli command tcflush
NAME 🖥️ tcflush 🖥️
get and set terminal attributes, line control, get and set baud rate
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <termios.h>
#include <unistd.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
const struct termios *termios_p);
int tcsendbreak(int fd, int duration);
int tcdrain(int fd);
int tcflush(int fd, int queue_selector);
int tcflow(int fd, int action);
void cfmakeraw(struct termios *termios_p);
speed_t cfgetispeed(const struct termios *termios_p);
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
int cfsetospeed(struct termios *termios_p, speed_t speed);
int cfsetspeed(struct termios *termios_p, speed_t speed);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
cfsetspeed(), cfmakeraw():
Since glibc 2.19:
_DEFAULT_SOURCE
glibc 2.19 and earlier:
_BSD_SOURCE
DESCRIPTION
The termios functions describe a general terminal interface that is provided to control asynchronous communications ports.
The termios structure
Many of the functions described here have a termios_p argument that is a pointer to a termios structure. This structure contains at least the following members:
tcflag_t c_iflag; /* input modes */
tcflag_t c_oflag; /* output modes */
tcflag_t c_cflag; /* control modes */
tcflag_t c_lflag; /* local modes */
cc_t c_cc[NCCS]; /* special characters */
The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see feature_test_macros(7)) is defined, as noted in brackets ("[]").
In the descriptions below, “not in POSIX” means that the value is not specified in POSIX.1-2001, and “XSI” means that the value is specified in POSIX.1-2001 as part of the XSI extension.
c_iflag flag constants:
IGNBRK
Ignore BREAK condition on input.
BRKINT
If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group. When neither IGNBRK nor BRKINT are set, a BREAK reads as a null byte (‘�’), except when PARMRK is set, in which case it reads as the sequence \377 � �.
IGNPAR
Ignore framing errors and parity errors.
PARMRK
If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set. The way erroneous bytes are marked is with two preceding bytes, \377 and �. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. If a valid byte has the value \377, and ISTRIP (see below) is not set, the program might confuse it with the prefix that marks a parity error. Therefore, a valid byte \377 is passed to the program as two bytes, \377 \377, in this case.
If neither IGNPAR nor PARMRK is set, read a character with a parity error or framing error as �.
INPCK
Enable input parity checking.
ISTRIP
Strip off eighth bit.
INLCR
Translate NL to CR on input.
IGNCR
Ignore carriage return on input.
ICRNL
Translate carriage return to newline on input (unless IGNCR is set).
IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.
IXON
Enable XON/XOFF flow control on output.
IXANY
(XSI) Typing any character will restart stopped output. (The default is to allow just the START character to restart output.)
IXOFF
Enable XON/XOFF flow control on input.
IMAXBEL
(not in POSIX) Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set.
IUTF8 (since Linux 2.6.4)
(not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode.
c_oflag flag constants:
OPOST
Enable implementation-defined output processing.
OLCUC
(not in POSIX) Map lowercase characters to uppercase on output.
ONLCR
(XSI) Map NL to CR-NL on output.
OCRNL
Map CR to NL on output.
ONOCR
Don’t output CR at column 0.
ONLRET
The NL character is assumed to do the carriage-return function; the kernel’s idea of the current column is set to 0 after both NL and CR.
OFILL
Send fill characters for a delay, rather than using a timed delay.
OFDEL
Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL (‘�’). (Not implemented on Linux.)
NLDLY
Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]
CRDLY
Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]
TABDLY
Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS, but see the BUGS section). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns). [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]
BSDLY
Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]
VTDLY
Vertical tab delay mask. Values are VT0 or VT1.
FFDLY
Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]
c_cflag flag constants:
CBAUD
(not in POSIX) Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE]
CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE]
(POSIX says that the baud speed is stored in the termios structure without specifying where precisely, and provides cfgetispeed() and cfsetispeed() for getting at it. Some systems use bits selected by CBAUD in c_cflag, other systems use separate fields, for example, sg_ispeed and sg_ospeed.)
CSIZE
Character size mask. Values are CS5, CS6, CS7, or CS8.
CSTOPB
Set two stop bits, rather than one.
CREAD
Enable receiver.
PARENB
Enable parity generation on output and parity checking for input.
PARODD
If set, then parity for input and output is odd; otherwise even parity is used.
HUPCL
Lower modem control lines after last process closes the device (hang up).
CLOCAL
Ignore modem control lines.
LOBLK
(not in POSIX) Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux.)
CIBAUD
(not in POSIX) Mask for input speeds. The values for the CIBAUD bits are the same as the values for the CBAUD bits, shifted left IBSHIFT bits. [requires _BSD_SOURCE or _SVID_SOURCE] (Not implemented in glibc, supported on Linux via TCGET* and TCSET* ioctls; see ioctl_tty(2))
CMSPAR
(not in POSIX) Use “stick” (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. [requires _BSD_SOURCE or _SVID_SOURCE]
CRTSCTS
(not in POSIX) Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE]
c_lflag flag constants:
ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal.
ICANON
Enable canonical mode (described below).
XCASE
(not in POSIX; not supported under Linux) If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \ On output, uppercase characters are preceded by \ and lowercase characters are converted to uppercase. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]
ECHO
Echo input characters.
ECHOE
If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word.
ECHOK
If ICANON is also set, the KILL character erases the current line.
ECHONL
If ICANON is also set, echo the NL character even if ECHO is not set.
ECHOCTL
(not in POSIX) If ECHO is also set, terminal special characters other than TAB, NL, START, and STOP are echoed as ^X, where X is the character with ASCII code 0x40 greater than the special character. For example, character 0x08 (BS) is echoed as ^H. [requires _BSD_SOURCE or _SVID_SOURCE]
ECHOPRT
(not in POSIX) If ICANON and ECHO are also set, characters are printed as they are being erased. [requires _BSD_SOURCE or _SVID_SOURCE]
ECHOKE
(not in POSIX) If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE]
DEFECHO
(not in POSIX) Echo only when a process is reading. (Not implemented on Linux.)
FLUSHO
(not in POSIX; not supported under Linux) Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE]
NOFLSH
Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters.
TOSTOP
Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal.
PENDIN
(not in POSIX; not supported under Linux) All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way.) [requires _BSD_SOURCE or _SVID_SOURCE]
IEXTEN
Enable implementation-defined input processing. This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective.
The c_cc array defines the terminal special characters. The symbolic indices (initial values) and meaning are:
VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) Toggle: start/stop discarding pending output. Recognized when IEXTEN is set, and then not passed as input.
VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.
VEOF
(004, EOT, Ctrl-D) End-of-file character (EOF). More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input.
VEOL
(0, NUL) Additional end-of-line character (EOL). Recognized when ICANON is set.
VEOL2
(not in POSIX; 0, NUL) Yet another end-of-line character (EOL2). Recognized when ICANON is set.
VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character (ERASE). This erases the previous not-yet-erased character, but does not erase past EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.
VINTR
(003, ETX, Ctrl-C, or also 0177, DEL, rubout) Interrupt character (INTR). Send a SIGINT signal. Recognized when ISIG is set, and then not passed as input.
VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.
VLNEXT
(not in POSIX; 026, SYN, Ctrl-V) Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input.
VMIN
Minimum number of characters for noncanonical read (MIN).
VQUIT
(034, FS, Ctrl-\ Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input.
VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) Reprint unread characters (REPRINT). Recognized when ICANON and IEXTEN are set, and then not passed as input.
VSTART
(021, DC1, Ctrl-Q) Start character (START). Restarts output stopped by the Stop character. Recognized when IXON is set, and then not passed as input.
VSTATUS
(not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). Status character (STATUS). Display status information at terminal, including state of foreground process and amount of CPU time it has consumed. Also sends a SIGINFO signal (not supported on Linux) to the foreground process group.
VSTOP
(023, DC3, Ctrl-S) Stop character (STOP). Stop output until Start character typed. Recognized when IXON is set, and then not passed as input.
VSUSP
(032, SUB, Ctrl-Z) Suspend character (SUSP). Send SIGTSTP signal. Recognized when ISIG is set, and then not passed as input.
VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control.
VTIME
Timeout in deciseconds for noncanonical read (TIME).
VWERASE
(not in POSIX; 027, ETB, Ctrl-W) Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input.
An individual terminal special character can be disabled by setting the value of the corresponding c_cc element to _POSIX_VDISABLE.
The above symbolic subscript values are all different, except that VTIME, VMIN may have the same value as VEOL, VEOF, respectively. In noncanonical mode the special character meaning is replaced by the timeout meaning. For an explanation of VMIN and VTIME, see the description of noncanonical mode below.
Retrieving and changing terminal settings
tcgetattr() gets the parameters associated with the object referred by fd and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process.
tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:
TCSANOW
the change occurs immediately.
TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.
TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.
Canonical and noncanonical mode
The setting of the ICANON canon flag in c_lflag determines whether the terminal is operating in canonical mode (ICANON set) or noncanonical mode (ICANON unset). By default, ICANON is set.
In canonical mode:
Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line). Except in the case of EOF, the line delimiter is included in the buffer returned by read(2).
Line editing is enabled (ERASE, KILL; and if the IEXTEN flag is set: WERASE, REPRINT, LNEXT). A read(2) returns at most one line of input; if the read(2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future read(2).
The maximum line length is 4096 chars (including the terminating newline character); lines longer than 4096 chars are truncated. After 4095 characters, input processing (e.g., ISIG and ECHO* processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read.
In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, and line editing is disabled. The read buffer will only accept 4095 chars; this provides the necessary space for a newline char if the input mode is switched to canonical. The settings of MIN (c_cc[VMIN]) and TIME (c_cc[VTIME]) determine the circumstances in which a read(2) completes; there are four distinct cases:
MIN == 0, TIME == 0 (polling read)
If data is available, read(2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, read(2) returns 0.
MIN > 0, TIME == 0 (blocking read)
read(2) blocks until MIN bytes are available, and returns up to the number of bytes requested.
MIN == 0, TIME > 0 (read with timeout)
TIME specifies the limit for a timer in tenths of a second. The timer is started when read(2) is called. read(2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, read(2) returns 0. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.
MIN > 0, TIME > 0 (read with interbyte timeout)
TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. read(2) returns when any of the following conditions is met:
MIN bytes have been received.
The interbyte timer expires.
The number of bytes requested by read(2) has been received. (POSIX does not specify this termination condition, and on some other implementations read(2) does not return in this case.)
Because the timer is started only after the initial byte becomes available, at least one byte will be read. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.
POSIX does not specify whether the setting of the O_NONBLOCK file status flag takes precedence over the MIN and TIME settings. If O_NONBLOCK is set, a read(2) in noncanonical mode may return immediately, regardless of the setting of MIN or TIME. Furthermore, if no data is available, POSIX permits a read(2) in noncanonical mode to return either 0, or -1 with errno set to EAGAIN.
Raw mode
cfmakeraw() sets the terminal to something like the “raw” mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:
termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
| INLCR | IGNCR | ICRNL | IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;
Line control
tcsendbreak() transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.
If the terminal is not using asynchronous serial data transmission, tcsendbreak() returns without taking any action.
tcdrain() waits until all output written to the object referred to by fd has been transmitted.
tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:
TCIFLUSH
flushes data received but not read.
TCOFLUSH
flushes data written but not transmitted.
TCIOFLUSH
flushes both data received but not read, and data written but not transmitted.
tcflow() suspends transmission or reception of data on the object referred to by fd, depending on the value of action:
TCOOFF
suspends output.
TCOON
restarts suspended output.
TCIOFF
transmits a STOP character, which stops the terminal device from transmitting data to the system.
TCION
transmits a START character, which starts the terminal device transmitting data to the system.
The default on open of a terminal file is that neither its input nor its output is suspended.
Line speed
The baud rate functions are provided for getting and setting the values of the input and output baud rates in the termios structure. The new values do not take effect until tcsetattr() is successfully called.
Setting the speed to B0 instructs the modem to “hang up”. The actual bit rate corresponding to B38400 may be altered with setserial(8).
The input and output baud rates are stored in the termios structure.
cfgetospeed() returns the output baud rate stored in the termios structure pointed to by termios_p.
cfsetospeed() sets the output baud rate stored in the termios structure pointed to by termios_p to speed, which must be one of these constants:
B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000These constants are additionally supported on the SPARC architecture:
B76800
B153600
B307200
B614400These constants are additionally supported on non-SPARC architectures:
B2500000
B3000000
B3500000
B4000000Due to differences between architectures, portable applications should check if a particular Bnnn constant is defined prior to using it.
The zero baud rate, B0, is used to terminate the connection. If B0 is specified, the modem control lines shall no longer be asserted. Normally, this will disconnect the line. CBAUDEX is a mask for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, B57600 & CBAUDEX is nonzero.
Setting the baud rate to a value other than those defined by Bnnn constants is possible via the TCSETS2 ioctl; see ioctl_tty(2).
cfgetispeed() returns the input baud rate stored in the termios structure.
cfsetispeed() sets the input baud rate stored in the termios structure to speed, which must be specified as one of the Bnnn constants listed above for cfsetospeed(). If the input baud rate is set to the literal constant 0 (not the symbolic constant B0), the input baud rate will be equal to the output baud rate.
cfsetspeed() is a 4.4BSD extension. It takes the same arguments as cfsetispeed(), and sets both input and output speed.
RETURN VALUE
cfgetispeed() returns the input baud rate stored in the termios structure.
cfgetospeed() returns the output baud rate stored in the termios structure.
All other functions return:
0
on success.
-1
on failure and set errno to indicate the error.
Note that tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
tcgetattr(), tcsetattr(), tcdrain(), tcflush(), tcflow(), tcsendbreak(), cfmakeraw(), cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), cfsetspeed() | Thread safety | MT-Safe |
STANDARDS
tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2008.
cfmakeraw()
cfsetspeed()
BSD.
HISTORY
tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2001.
cfmakeraw()
cfsetspeed()
BSD.
NOTES
UNIX V7 and several later systems have a list of baud rates where after the values B0 through B9600 one finds the two constants EXTA, EXTB (“External A” and “External B”). Many systems extend the list with much higher baud rates.
The effect of a nonzero duration with tcsendbreak() varies. SunOS specifies a break of duration * N seconds, where N is at least 0.25, and not more than 0.5. Linux, AIX, DU, Tru64 send a break of duration milliseconds. FreeBSD and NetBSD and HP-UX and MacOS ignore the value of duration. Under Solaris and UnixWare, tcsendbreak() with nonzero duration behaves like tcdrain().
BUGS
On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the XTABS value was different from TAB3 and it was ignored by the N_TTY line discipline code of the terminal driver as a result (because as it wasn’t part of the TABDLY mask).
SEE ALSO
reset(1), setterm(1), stty(1), tput(1), tset(1), tty(1), ioctl_console(2), ioctl_tty(2), cc_t(3type), speed_t(3type), tcflag_t(3type), setserial(8)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
140 - Linux cli command Moose_Meta_Role_Attributepm
NAME 🖥️ Moose_Meta_Role_Attributepm 🖥️
The Moose attribute metaclass for Roles
VERSION
version 2.2207
DESCRIPTION
This class implements the API for attributes in roles. Attributes in roles are more like attribute prototypes than full blown attributes. While they are introspectable, they have very little behavior.
METHODS
Moose::Meta::Role::Attribute->new(…)
This method accepts all the options that would be passed to the constructor for Moose::Meta::Attribute.
$attr->metaclass
$attr->is
Returns the option as passed to the constructor.
$attr->associated_role
Returns the Moose::Meta::Role to which this attribute belongs, if any.
$attr->original_role
Returns the Moose::Meta::Role in which this attribute was first defined. This may not be the same as the value of associated_role()
for attributes in a composite role, or when one role consumes other roles.
$attr->original_options
Returns a hash reference of options passed to the constructor. This is used when creating a Moose::Meta::Attribute object from this object.
$attr->attach_to_role($role)
Attaches the attribute to the given Moose::Meta::Role.
$attr->attribute_for_class($metaclass)
Given an attribute metaclass name, this method calls $metaclass->interpolate_class_and_new
to construct an attribute object which can be added to a Moose::Meta::Class.
$attr->clone
Creates a new object identical to the object on which the method is called.
$attr->is_same_as($other_attr)
Compares two role attributes and returns true if they are identical.
In addition, this class implements all informational predicates implements by Moose::Meta::Attribute (and Class::MOP::Attribute).
BUGS
See “BUGS” in Moose for details on reporting bugs.
AUTHORS
Stevan Little <[email protected]>
Dave Rolsky <[email protected]>
Jesse Luehrs <[email protected]>
Shawn M Moore <[email protected]>
יובל קוג’מן (Yuval Kogman) <[email protected]>
Karen Etheridge <[email protected]>
Florian Ragwitz <[email protected]>
Hans Dieter Pearcey <[email protected]>
Chris Prather <[email protected]>
Matt S Trout <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
141 - Linux cli command tanhf
NAME 🖥️ tanhf 🖥️
hyperbolic tangent function
LIBRARY
Math library (libm, -lm)
SYNOPSIS
#include <math.h>
double tanh(double x);
float tanhf(float x);
long double tanhl(long double x);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
tanhf(), tanhl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These functions return the hyperbolic tangent of x, which is defined mathematically as:
tanh(x) = sinh(x) / cosh(x)
RETURN VALUE
On success, these functions return the hyperbolic tangent of x.
If x is a NaN, a NaN is returned.
If x is +0 (-0), +0 (-0) is returned.
If x is positive infinity (negative infinity), +1 (-1) is returned.
ERRORS
No errors occur.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
tanh(), tanhf(), tanhl() | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
C99, POSIX.1-2001.
The variant returning double also conforms to SVr4, 4.3BSD, C89.
SEE ALSO
acosh(3), asinh(3), atanh(3), cosh(3), ctanh(3), sinh(3)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
142 - Linux cli command Tk_Bitmappm
NAME 🖥️ Tk_Bitmappm 🖥️
Images that display two colors
SYNOPSIS
$image
= $widget
->Bitmap?(name??,options?)
DESCRIPTION
A bitmap is an image whose pixels can display either of two colors or be transparent. A bitmap image is defined by four things: a background color, a foreground color, and two bitmaps, called the source and the mask. Each of the bitmaps specifies 0/1 values for a rectangular array of pixels, and the two bitmaps must have the same dimensions. For pixels where the mask is zero, the image displays nothing, producing a transparent effect. For other pixels, the image displays the foreground color if the source data is one and the background color if the source data is zero.
CREATING BITMAPS
Bitmaps are created using $widget
->Bitmap. Bitmaps support the following options:
-background => color
Specifies a background color for the image in any of the standard ways accepted by Tk. If this option is set to an empty string then the background pixels will be transparent. This effect is achieved by using the source bitmap as the mask bitmap, ignoring any -maskdata or -maskfile options.
-data => string
Specifies the contents of the source bitmap as a string. The string must adhere to X11 bitmap format (e.g., as generated by the bitmap program). If both the -data and -file options are specified, the -data option takes precedence.
-file => name
name gives the name of a file whose contents define the source bitmap. The file must adhere to X11 bitmap format (e.g., as generated by the bitmap program).
-foreground => color
Specifies a foreground color for the image in any of the standard ways accepted by Tk.
-maskdata => string
Specifies the contents of the mask as a string. The string must adhere to X11 bitmap format (e.g., as generated by the bitmap program). If both the -maskdata and -maskfile options are specified, the -maskdata option takes precedence.
-maskfile => name
name gives the name of a file whose contents define the mask. The file must adhere to X11 bitmap format (e.g., as generated by the bitmap program).
IMAGE METHODS
When a bitmap image is created, Tk also creates a new object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above.
SEE ALSO
Tk::Image Tk::Pixmap Tk::Photo
KEYWORDS
bitmap, image
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
143 - Linux cli command getmntent_r
NAME 🖥️ getmntent_r 🖥️
get filesystem descriptor file entry
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdio.h>
#include <mntent.h>
FILE *setmntent(const char *filename, const char *type);
struct mntent *getmntent(FILE *stream);
int addmntent(FILE *restrict stream,
const struct mntent *restrict mnt);
int endmntent(FILE *streamp);
char *hasmntopt(const struct mntent *mnt, const char *opt);
/* GNU extension */
#include <mntent.h>
struct mntent *getmntent_r(FILE *restrict streamp,
struct mntent *restrict mntbuf,
char buf[restrict .buflen], int buflen);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getmntent_r():
Since glibc 2.19:
_DEFAULT_SOURCE
glibc 2.19 and earlier:
_BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These routines are used to access the filesystem description file /etc/fstab and the mounted filesystem description file /etc/mtab.
The setmntent() function opens the filesystem description file filename and returns a file pointer which can be used by getmntent(). The argument type is the type of access required and can take the same values as the mode argument of fopen(3). The returned stream should be closed using endmntent() rather than fclose(3).
The getmntent() function reads the next line of the filesystem description file from stream and returns a pointer to a structure containing the broken out fields from a line in the file. The pointer points to a static area of memory which is overwritten by subsequent calls to getmntent().
The addmntent() function adds the mntent structure mnt to the end of the open stream.
The endmntent() function closes the stream associated with the filesystem description file.
The hasmntopt() function scans the mnt_opts field (see below) of the mntent structure mnt for a substring that matches opt. See <mntent.h> and mount(8) for valid mount options.
The reentrant getmntent_r() function is similar to getmntent(), but stores the mntent structure in the provided *mntbuf, and stores the strings pointed to by the entries in that structure in the provided array buf of size buflen.
The mntent structure is defined in <mntent.h> as follows:
struct mntent {
char *mnt_fsname; /* name of mounted filesystem */
char *mnt_dir; /* filesystem path prefix */
char *mnt_type; /* mount type (see mntent.h) */
char *mnt_opts; /* mount options (see mntent.h) */
int mnt_freq; /* dump frequency in days */
int mnt_passno; /* pass number on parallel fsck */
};
Since fields in the mtab and fstab files are separated by whitespace, octal escapes are used to represent the characters space ( ), tab ( ), newline ( ), and backslash () in those files when they occur in one of the four strings in a mntent structure. The routines addmntent() and getmntent() will convert from string representation to escaped representation and back. When converting from escaped representation, the sequence \134 is also converted to a backslash.
RETURN VALUE
The getmntent() and getmntent_r() functions return a pointer to the mntent structure or NULL on failure.
The addmntent() function returns 0 on success and 1 on failure.
The endmntent() function always returns 1.
The hasmntopt() function returns the address of the substring if a match is found and NULL otherwise.
FILES
/etc/fstab
filesystem description file
/etc/mtab
mounted filesystem description file
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
setmntent(), endmntent(), hasmntopt() | Thread safety | MT-Safe |
getmntent() | Thread safety | MT-Unsafe race:mntentbuf locale |
addmntent() | Thread safety | MT-Safe race:stream locale |
getmntent_r() | Thread safety | MT-Safe locale |
STANDARDS
None.
HISTORY
The nonreentrant functions are from SunOS 4.1.3. A routine getmntent_r() was introduced in HP-UX 10, but it returns an int. The prototype shown above is glibc-only.
System V also has a getmntent() function but the calling sequence differs, and the returned structure is different. Under System V /etc/mnttab is used. 4.4BSD and Digital UNIX have a routine getmntinfo(), a wrapper around the system call getfsstat().
SEE ALSO
fopen(3), fstab(5), mount(8)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
144 - Linux cli command Net_DNS_SEC_DSApm
NAME 🖥️ Net_DNS_SEC_DSApm 🖥️
DNSSEC DSA digital signature algorithm
SYNOPSIS
require Net::DNS::SEC::DSA; $signature = Net::DNS::SEC::DSA->sign( $sigdata, $private ); $validated = Net::DNS::SEC::DSA->verify( $sigdata, $keyrr, $sigbin );
DESCRIPTION
Implementation of DSA digital signature generation and verification procedures.
sign
$signature = Net::DNS::SEC::DSA->sign( $sigdata, $private );
Generates the wire-format signature from the sigdata octet string and the appropriate private key object.
verify
$validated = Net::DNS::SEC::DSA->verify( $sigdata, $keyrr, $sigbin );
Verifies the signature over the sigdata octet string using the specified public key resource record.
ACKNOWLEDGMENT
Thanks are due to Eric Young and the many developers and contributors to the OpenSSL cryptographic library.
COPYRIGHT
Copyright (c)2014,2018 Dick Franks.
All rights reserved.
LICENSE
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SEE ALSO
Net::DNS, Net::DNS::SEC, RFC2536, OpenSSL <http://www.openssl.org/docs>
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
145 - Linux cli command JSONpm
NAME 🖥️ JSONpm 🖥️
JSON (JavaScript Object Notation) encoder/decoder
SYNOPSIS
use JSON; # imports encode_json, decode_json, to_json and from_json. # simple and fast interfaces (expect/generate UTF-8) $utf8_encoded_json_text = encode_json $perl_hash_or_arrayref; $perl_hash_or_arrayref = decode_json $utf8_encoded_json_text; # OO-interface $json = JSON->new->allow_nonref; $json_text = $json->encode( $perl_scalar ); $perl_scalar = $json->decode( $json_text ); $pretty_printed = $json->pretty->encode( $perl_scalar ); # pretty-printing
DESCRIPTION
This module is a thin wrapper for JSON::XS-compatible modules with a few additional features. All the backend modules convert a Perl data structure to a JSON text and vice versa. This module uses JSON::XS by default, and when JSON::XS is not available, falls back on JSON::PP, which is in the Perl core since 5.14. If JSON::PP is not available either, this module then falls back on JSON::backportPP (which is actually JSON::PP in a different .pm file) bundled in the same distribution as this module. You can also explicitly specify to use Cpanel::JSON::XS, a fork of JSON::XS by Reini Urban.
All these backend modules have slight incompatibilities between them, including extra features that other modules don’t support, but as long as you use only common features (most important ones are described below), migration from backend to backend should be reasonably easy. For details, see each backend module you use.
CHOOSING BACKEND
This module respects an environmental variable called PERL_JSON_BACKEND
when it decides a backend module to use. If this environmental variable is not set, it tries to load JSON::XS, and if JSON::XS is not available, it falls back on JSON::PP, and then JSON::backportPP if JSON::PP is not available either.
If you always don’t want it to fall back on pure perl modules, set the variable like this (export
may be setenv
, set
and the likes, depending on your environment):
> export PERL_JSON_BACKEND=JSON::XS
If you prefer Cpanel::JSON::XS to JSON::XS, then:
> export PERL_JSON_BACKEND=Cpanel::JSON::XS,JSON::XS,JSON::PP
You may also want to set this variable at the top of your test files, in order not to be bothered with incompatibilities between backends (you need to wrap this in BEGIN
, and set before actually use
-ing JSON module, as it decides its backend as soon as it’s loaded):
BEGIN { $ENV{PERL_JSON_BACKEND}=JSON::backportPP; } use JSON;
USING OPTIONAL FEATURES
There are a few options you can set when you use
this module. These historical options are only kept for backward compatibility, and should not be used in a new application.
-support_by_pp
BEGIN { $ENV{PERL_JSON_BACKEND} = JSON::XS } use JSON -support_by_pp; my $json = JSON->new; # escape_slash is for JSON::PP only. $json->allow_nonref->escape_slash->encode("/"); With this option, this module loads its pure perl backend along with its XS backend (if available), and lets the XS backend to watch if you set a flag only JSON::PP supports. When you do, the internal JSON::XS object is replaced with a newly created JSON::PP object with the setting copied from the XS object, so that you can use JSON::PP flags (and its slower decode
/encode
methods) from then on. In other words, this is not something that allows you to hook JSON::XS to change its behavior while keeping its speed. JSON::XS and JSON::PP objects are quite different (JSON::XS object is a blessed scalar reference, while JSON::PP object is a blessed hash reference), and can’t share their internals. To avoid needless overhead (by copying settings), you are advised not to use this option and just to use JSON::PP explicitly when you need JSON::PP features.
-convert_blessed_universally
use JSON -convert_blessed_universally; my $json = JSON->new->allow_nonref->convert_blessed; my $object = bless {foo => bar}, Foo; $json->encode($object); # => {“foo”:“bar”} JSON::XS-compatible backend modules don’t encode blessed objects by default (except for their boolean values, which are typically blessed JSON::PP::Boolean objects). If you need to encode a data structure that may contain objects, you usually need to look into the structure and replace objects with alternative non-blessed values, or enable convert_blessed
and provide a TO_JSON
method for each object’s (base) class that may be found in the structure, in order to let the methods replace the objects with whatever scalar values the methods return. If you need to serialise data structures that may contain arbitrary objects, it’s probably better to use other serialisers (such as Sereal or Storable for example), but if you do want to use this module for that purpose, -convert_blessed_universally
option may help, which tweaks encode
method of the backend to install UNIVERSAL::TO_JSON
method (locally) before encoding, so that all the objects that don’t have their own TO_JSON
method can fall back on the method in the UNIVERSAL
namespace. Note that you still need to enable convert_blessed
flag to actually encode objects in a data structure, and UNIVERSAL::TO_JSON
method installed by this option only converts blessed hash/array references into their unblessed clone (including private keys/values that are not supposed to be exposed). Other blessed references will be converted into null. This feature is experimental and may be removed in the future.
-no_export
When you don’t want to import functional interfaces from a module, you usually supply ()
to its use
statement. use JSON (); # no functional interfaces If you don’t want to import functional interfaces, but you also want to use any of the above options, add -no_export
to the option list. # no functional interfaces, while JSON::PP support is enabled. use JSON -support_by_pp, -no_export;
FUNCTIONAL INTERFACE
This section is taken from JSON::XS. encode_json
and decode_json
are exported by default.
This module also exports to_json
and from_json
for backward compatibility. These are slower, and may expect/generate different stuff from what encode_json
and decode_json
do, depending on their options. It’s better just to use Object-Oriented interfaces than using these two functions.
encode_json
$json_text = encode_json $perl_scalar
Converts the given Perl data structure to a UTF-8 encoded, binary string (that is, the string contains octets only). Croaks on error.
This function call is functionally identical to:
$json_text = JSON->new->utf8->encode($perl_scalar)
Except being faster.
decode_json
$perl_scalar = decode_json $json_text
The opposite of encode_json
: expects an UTF-8 (binary) string and tries to parse that as an UTF-8 encoded JSON text, returning the resulting reference. Croaks on error.
This function call is functionally identical to:
$perl_scalar = JSON->new->utf8->decode($json_text)
Except being faster.
to_json
$json_text = to_json($perl_scalar[, $optional_hashref])
Converts the given Perl data structure to a Unicode string by default. Croaks on error.
Basically, this function call is functionally identical to:
$json_text = JSON->new->encode($perl_scalar)
Except being slower.
You can pass an optional hash reference to modify its behavior, but that may change what to_json
expects/generates (see ENCODING/CODESET FLAG NOTES
for details).
$json_text = to_json($perl_scalar, {utf8 => 1, pretty => 1}) # => JSON->new->utf8(1)->pretty(1)->encode($perl_scalar)
from_json
$perl_scalar = from_json($json_text[, $optional_hashref])
The opposite of to_json
: expects a Unicode string and tries to parse it, returning the resulting reference. Croaks on error.
Basically, this function call is functionally identical to:
$perl_scalar = JSON->new->decode($json_text)
You can pass an optional hash reference to modify its behavior, but that may change what from_json
expects/generates (see ENCODING/CODESET FLAG NOTES
for details).
$perl_scalar = from_json($json_text, {utf8 => 1}) # => JSON->new->utf8(1)->decode($json_text)
JSON::is_bool
$is_boolean = JSON::is_bool($scalar)
Returns true if the passed scalar represents either JSON::true or JSON::false, two constants that act like 1
and 0
respectively and are also used to represent JSON true
and false
in Perl strings.
See MAPPING, below, for more information on how JSON values are mapped to Perl.
COMMON OBJECT-ORIENTED INTERFACE
This section is also taken from JSON::XS.
The object oriented interface lets you configure your own encoding or decoding style, within the limits of supported formats.
new
$json = JSON->new
Creates a new JSON::XS-compatible backend object that can be used to de/encode JSON strings. All boolean flags described below are by default disabled (with the exception of allow_nonref
, which defaults to enabled since version 4.0
).
The mutators for flags all return the backend object again and thus calls can be chained:
my $json = JSON->new->utf8->space_after->encode({a => [1,2]}) => {“a”: [1, 2]}
ascii
$json = $json->ascii([$enable]) $enabled = $json->get_ascii
If $enable
is true (or missing), then the encode
method will not generate characters outside the code range 0..127
(which is ASCII). Any Unicode characters outside that range will be escaped using either a single \uXXXX (BMP characters) or a double \uHHHH\uLLLLL escape sequence, as per RFC4627. The resulting encoded JSON text can be treated as a native Unicode string, an ascii-encoded, latin1-encoded or UTF-8 encoded string, or any other superset of ASCII.
If $enable
is false, then the encode
method will not escape Unicode characters unless required by the JSON syntax or other flags. This results in a faster and more compact format.
See also the section ENCODING/CODESET FLAG NOTES later in this document.
The main use for this flag is to produce JSON texts that can be transmitted over a 7-bit channel, as the encoded JSON texts will not contain any 8 bit characters.
JSON->new->ascii(1)->encode([chr 0x10401]) => ["������"]
latin1
$json = $json->latin1([$enable]) $enabled = $json->get_latin1
If $enable
is true (or missing), then the encode
method will encode the resulting JSON text as latin1 (or iso-8859-1), escaping any characters outside the code range 0..255
. The resulting string can be treated as a latin1-encoded JSON text or a native Unicode string. The decode
method will not be affected in any way by this flag, as decode
by default expects Unicode, which is a strict superset of latin1.
If $enable
is false, then the encode
method will not escape Unicode characters unless required by the JSON syntax or other flags.
See also the section ENCODING/CODESET FLAG NOTES later in this document.
The main use for this flag is efficiently encoding binary data as JSON text, as most octets will not be escaped, resulting in a smaller encoded size. The disadvantage is that the resulting JSON text is encoded in latin1 (and must correctly be treated as such when storing and transferring), a rare encoding for JSON. It is therefore most useful when you want to store data structures known to contain binary data efficiently in files or databases, not when talking to other JSON encoders/decoders.
JSON->new->latin1->encode (["\x{89}\x{abc}"] => ["\x{89}\u0abc"] # (perl syntax, U+abc escaped, U+89 not)
utf8
$json = $json->utf8([$enable]) $enabled = $json->get_utf8
If $enable
is true (or missing), then the encode
method will encode the JSON result into UTF-8, as required by many protocols, while the decode
method expects to be handled an UTF-8-encoded string. Please note that UTF-8-encoded strings do not contain any characters outside the range 0..255
, they are thus useful for bytewise/binary I/O. In future versions, enabling this option might enable autodetection of the UTF-16 and UTF-32 encoding families, as described in RFC4627.
If $enable
is false, then the encode
method will return the JSON string as a (non-encoded) Unicode string, while decode
expects thus a Unicode string. Any decoding or encoding (e.g. to UTF-8 or UTF-16) needs to be done yourself, e.g. using the Encode module.
See also the section ENCODING/CODESET FLAG NOTES later in this document.
Example, output UTF-16BE-encoded JSON:
use Encode; $jsontext = encode “UTF-16BE”, JSON->new->encode ($object);
Example, decode UTF-32LE-encoded JSON:
use Encode; $object = JSON->new->decode (decode “UTF-32LE”, $jsontext);
pretty
$json = $json->pretty([$enable])
This enables (or disables) all of the indent
, space_before
and space_after
(and in the future possibly more) flags in one call to generate the most readable (or most compact) form possible.
indent
$json = $json->indent([$enable]) $enabled = $json->get_indent
If $enable
is true (or missing), then the encode
method will use a multiline format as output, putting every array member or object/hash key-value pair into its own line, indenting them properly.
If $enable
is false, no newlines or indenting will be produced, and the resulting JSON text is guaranteed not to contain any newlines
.
This setting has no effect when decoding JSON texts.
space_before
$json = $json->space_before([$enable]) $enabled = $json->get_space_before
If $enable
is true (or missing), then the encode
method will add an extra optional space before the :
separating keys from values in JSON objects.
If $enable
is false, then the encode
method will not add any extra space at those places.
This setting has no effect when decoding JSON texts. You will also most likely combine this setting with space_after
.
Example, space_before enabled, space_after and indent disabled:
{“key” :“value”}
space_after
$json = $json->space_after([$enable]) $enabled = $json->get_space_after
If $enable
is true (or missing), then the encode
method will add an extra optional space after the :
separating keys from values in JSON objects and extra whitespace after the ,
separating key-value pairs and array members.
If $enable
is false, then the encode
method will not add any extra space at those places.
This setting has no effect when decoding JSON texts.
Example, space_before and indent disabled, space_after enabled:
{“key”: “value”}
relaxed
$json = $json->relaxed([$enable]) $enabled = $json->get_relaxed
If $enable
is true (or missing), then decode
will accept some extensions to normal JSON syntax (see below). encode
will not be affected in any way. Be aware that this option makes you accept invalid JSON texts as if they were valid!. I suggest only to use this option to parse application-specific files written by humans (configuration files, resource files etc.)
If $enable
is false (the default), then decode
will only accept valid JSON texts.
Currently accepted extensions are:
list items can have an end-comma JSON separates array elements and key-value pairs with commas. This can be annoying if you write JSON texts manually and want to be able to quickly append elements, so this extension accepts comma at the end of such items not just between them: [ 1, 2, <- this comma not normally allowed ] { “k1”: “v1”, “k2”: “v2”, <- this comma not normally allowed }
shell-style ‘#’-comments Whenever JSON allows whitespace, shell-style comments are additionally allowed. They are terminated by the first carriage-return or line-feed character, after which more white-space and comments are allowed. [ 1, # this comment not allowed in JSON # neither this one… ]
canonical
$json = $json->canonical([$enable]) $enabled = $json->get_canonical
If $enable
is true (or missing), then the encode
method will output JSON objects by sorting their keys. This is adding a comparatively high overhead.
If $enable
is false, then the encode
method will output key-value pairs in the order Perl stores them (which will likely change between runs of the same script, and can change even within the same run from 5.18 onwards).
This option is useful if you want the same data structure to be encoded as the same JSON text (given the same overall settings). If it is disabled, the same hash might be encoded differently even if contains the same data, as key-value pairs have no inherent ordering in Perl.
This setting has no effect when decoding JSON texts.
This setting has currently no effect on tied hashes.
allow_nonref
$json = $json->allow_nonref([$enable]) $enabled = $json->get_allow_nonref
Unlike other boolean options, this option is enabled by default beginning with version 4.0
.
If $enable
is true (or missing), then the encode
method can convert a non-reference into its corresponding string, number or null JSON value, which is an extension to RFC4627. Likewise, decode
will accept those JSON values instead of croaking.
If $enable
is false, then the encode
method will croak if it isn’t passed an arrayref or hashref, as JSON texts must either be an object or array. Likewise, decode
will croak if given something that is not a JSON object or array.
Example, encode a Perl scalar as JSON value with enabled allow_nonref
, resulting in an invalid JSON text:
JSON->new->allow_nonref->encode (“Hello, World!”) => “Hello, World!”
allow_unknown
$json = $json->allow_unknown ([$enable]) $enabled = $json->get_allow_unknown
If $enable
is true (or missing), then encode
will not throw an exception when it encounters values it cannot represent in JSON (for example, filehandles) but instead will encode a JSON null
value. Note that blessed objects are not included here and are handled separately by c<allow_blessed>.
If $enable
is false (the default), then encode
will throw an exception when it encounters anything it cannot encode as JSON.
This option does not affect decode
in any way, and it is recommended to leave it off unless you know your communications partner.
allow_blessed
$json = $json->allow_blessed([$enable]) $enabled = $json->get_allow_blessed
See OBJECT SERIALISATION for details.
If $enable
is true (or missing), then the encode
method will not barf when it encounters a blessed reference that it cannot convert otherwise. Instead, a JSON null
value is encoded instead of the object.
If $enable
is false (the default), then encode
will throw an exception when it encounters a blessed object that it cannot convert otherwise.
This setting has no effect on decode
.
convert_blessed
$json = $json->convert_blessed([$enable]) $enabled = $json->get_convert_blessed
See OBJECT SERIALISATION for details.
If $enable
is true (or missing), then encode
, upon encountering a blessed object, will check for the availability of the TO_JSON
method on the object’s class. If found, it will be called in scalar context and the resulting scalar will be encoded instead of the object.
The TO_JSON
method may safely call die if it wants. If TO_JSON
returns other blessed objects, those will be handled in the same way. TO_JSON
must take care of not causing an endless recursion cycle (== crash) in this case. The name of TO_JSON
was chosen because other methods called by the Perl core (== not by the user of the object) are usually in upper case letters and to avoid collisions with any to_json
function or method.
If $enable
is false (the default), then encode
will not consider this type of conversion.
This setting has no effect on decode
.
allow_tags (since version 3.0)
$json = $json->allow_tags([$enable]) $enabled = $json->get_allow_tags
See OBJECT SERIALISATION for details.
If $enable
is true (or missing), then encode
, upon encountering a blessed object, will check for the availability of the FREEZE
method on the object’s class. If found, it will be used to serialise the object into a nonstandard tagged JSON value (that JSON decoders cannot decode).
It also causes decode
to parse such tagged JSON values and deserialise them via a call to the THAW
method.
If $enable
is false (the default), then encode
will not consider this type of conversion, and tagged JSON values will cause a parse error in decode
, as if tags were not part of the grammar.
boolean_values (since version 4.0)
$json->boolean_values([$false, $true]) ($false, $true) = $json->get_boolean_values
By default, JSON booleans will be decoded as overloaded $JSON::false
and $JSON::true
objects.
With this method you can specify your own boolean values for decoding - on decode, JSON false
will be decoded as a copy of $false
, and JSON true
will be decoded as $true
(copy here is the same thing as assigning a value to another variable, i.e. $copy = $false
).
This is useful when you want to pass a decoded data structure directly to other serialisers like YAML, Data::MessagePack and so on.
Note that this works only when you decode
. You can set incompatible boolean objects (like boolean), but when you encode
a data structure with such boolean objects, you still need to enable convert_blessed
(and add a TO_JSON
method if necessary).
Calling this method without any arguments will reset the booleans to their default values.
get_boolean_values
will return both $false
and $true
values, or the empty list when they are set to the default.
filter_json_object
$json = $json->filter_json_object([$coderef])
When $coderef
is specified, it will be called from decode
each time it decodes a JSON object. The only argument is a reference to the newly-created hash. If the code references returns a single scalar (which need not be a reference), this value (or rather a copy of it) is inserted into the deserialised data structure. If it returns an empty list (NOTE: not undef
, which is a valid scalar), the original deserialised hash will be inserted. This setting can slow down decoding considerably.
When $coderef
is omitted or undefined, any existing callback will be removed and decode
will not change the deserialised hash in any way.
Example, convert all JSON objects into the integer 5:
my $js = JSON->new->filter_json_object(sub { 5 }); # returns [5] $js->decode([{}]); # returns 5 $js->decode({“a”:1, “b”:2});
filter_json_single_key_object
$json = $json->filter_json_single_key_object($key [=> $coderef])
Works remotely similar to filter_json_object
, but is only called for JSON objects having a single key named $key
.
This $coderef
is called before the one specified via filter_json_object
, if any. It gets passed the single value in the JSON object. If it returns a single value, it will be inserted into the data structure. If it returns nothing (not even undef
but the empty list), the callback from filter_json_object
will be called next, as if no single-key callback were specified.
If $coderef
is omitted or undefined, the corresponding callback will be disabled. There can only ever be one callback for a given key.
As this callback gets called less often then the filter_json_object
one, decoding speed will not usually suffer as much. Therefore, single-key objects make excellent targets to serialise Perl objects into, especially as single-key JSON objects are as close to the type-tagged value concept as JSON gets (it’s basically an ID/VALUE tuple). Of course, JSON does not support this in any way, so you need to make sure your data never looks like a serialised Perl hash.
Typical names for the single object key are _ _class_whatever_ _
, or $_ _dollars_are_rarely_used_ _$
or }ugly_brace_placement
, or even things like _ _class_md5sum(classname)_ _
, to reduce the risk of clashing with real hashes.
Example, decode JSON objects of the form { "_ _widget_ _" => <id> }
into the corresponding $WIDGET{<id>}
object:
# return whatever is in $WIDGET{5}: JSON ->new ->filter_json_single_key_object (_ _widget_ _ => sub { $WIDGET{ $_[0] } }) ->decode ({"_ _widget_ _": 5) # this can be used with a TO_JSON method in some “widget” class # for serialisation to json: sub WidgetBase::TO_JSON { my ($self) = @_; unless ($self->{id}) { $self->{id} = ..get..some..id..; $WIDGET{$self->{id}} = $self; } { _ _widget_ _ => $self->{id} } }
max_depth
$json = $json->max_depth([$maximum_nesting_depth]) $max_depth = $json->get_max_depth
Sets the maximum nesting level (default 512
) accepted while encoding or decoding. If a higher nesting level is detected in JSON text or a Perl data structure, then the encoder and decoder will stop and croak at that point.
Nesting level is defined by number of hash- or arrayrefs that the encoder needs to traverse to reach a given point or the number of {
or [
characters without their matching closing parenthesis crossed to reach a given character in a string.
Setting the maximum depth to one disallows any nesting, so that ensures that the object is only a single hash/object or array.
If no argument is given, the highest possible setting will be used, which is rarely useful.
See SECURITY CONSIDERATIONS in JSON::XS for more info on why this is useful.
max_size
$json = $json->max_size([$maximum_string_size]) $max_size = $json->get_max_size
Set the maximum length a JSON text may have (in bytes) where decoding is being attempted. The default is 0
, meaning no limit. When decode
is called on a string that is longer then this many bytes, it will not attempt to decode the string but throw an exception. This setting has no effect on encode
(yet).
If no argument is given, the limit check will be deactivated (same as when 0
is specified).
See SECURITY CONSIDERATIONS in JSON::XS for more info on why this is useful.
encode
$json_text = $json->encode($perl_scalar)
Converts the given Perl value or data structure to its JSON representation. Croaks on error.
decode
$perl_scalar = $json->decode($json_text)
The opposite of encode
: expects a JSON text and tries to parse it, returning the resulting simple scalar or reference. Croaks on error.
decode_prefix
($perl_scalar, $characters) = $json->decode_prefix($json_text)
This works like the decode
method, but instead of raising an exception when there is trailing garbage after the first JSON object, it will silently stop parsing there and return the number of characters consumed so far.
This is useful if your JSON texts are not delimited by an outer protocol and you need to know where the JSON text ends.
JSON->new->decode_prefix ("[1] the tail") => ([1], 3)
ADDITIONAL METHODS
The following methods are for this module only.
backend
$backend = $json->backend
Since 2.92, backend
method returns an abstract backend module used currently, which should be JSON::Backend::XS (which inherits JSON::XS or Cpanel::JSON::XS), or JSON::Backend::PP (which inherits JSON::PP), not to monkey-patch the actual backend module globally.
If you need to know what is used actually, use isa
, instead of string comparison.
is_xs
$boolean = $json->is_xs
Returns true if the backend inherits JSON::XS or Cpanel::JSON::XS.
is_pp
$boolean = $json->is_pp
Returns true if the backend inherits JSON::PP.
property
$settings = $json->property()
Returns a reference to a hash that holds all the common flag settings.
$json = $json->property(utf8 => 1) $value = $json->property(utf8) # 1
You can use this to get/set a value of a particular flag.
boolean
$boolean_object = JSON->boolean($scalar)
Returns $JSON::true
if $scalar
contains a true value, $JSON::false
otherwise. You can use this as a full-qualified function (JSON::boolean($scalar)
).
INCREMENTAL PARSING
This section is also taken from JSON::XS.
In some cases, there is the need for incremental parsing of JSON texts. While this module always has to keep both JSON text and resulting Perl data structure in memory at one time, it does allow you to parse a JSON stream incrementally. It does so by accumulating text until it has a full JSON object, which it then can decode. This process is similar to using decode_prefix
to see if a full JSON object is available, but is much more efficient (and can be implemented with a minimum of method calls).
This module will only attempt to parse the JSON text once it is sure it has enough text to get a decisive result, using a very simple but truly incremental parser. This means that it sometimes won’t stop as early as the full parser, for example, it doesn’t detect mismatched parentheses. The only thing it guarantees is that it starts decoding as soon as a syntactically valid JSON text has been seen. This means you need to set resource limits (e.g. max_size
) to ensure the parser will stop parsing in the presence if syntax errors.
The following methods implement this incremental parser.
incr_parse
$json->incr_parse( [$string] ) # void context $obj_or_undef = $json->incr_parse( [$string] ) # scalar context @obj_or_empty = $json->incr_parse( [$string] ) # list context
This is the central parsing function. It can both append new text and extract objects from the stream accumulated so far (both of these functions are optional).
If $string
is given, then this string is appended to the already existing JSON fragment stored in the $json
object.
After that, if the function is called in void context, it will simply return without doing anything further. This can be used to add more text in as many chunks as you want.
If the method is called in scalar context, then it will try to extract exactly one JSON object. If that is successful, it will return this object, otherwise it will return undef
. If there is a parse error, this method will croak just as decode
would do (one can then use incr_skip
to skip the erroneous part). This is the most common way of using the method.
And finally, in list context, it will try to extract as many objects from the stream as it can find and return them, or the empty list otherwise. For this to work, there must be no separators (other than whitespace) between the JSON objects or arrays, instead they must be concatenated back-to-back. If an error occurs, an exception will be raised as in the scalar context case. Note that in this case, any previously-parsed JSON texts will be lost.
Example: Parse some JSON arrays/objects in a given string and return them.
my @objs = JSON->new->incr_parse ("[5][7][1,2]");
incr_text
$lvalue_string = $json->incr_text
This method returns the currently stored JSON fragment as an lvalue, that is, you can manipulate it. This only works when a preceding call to incr_parse
in scalar context successfully returned an object. Under all other circumstances you must not call this function (I mean it. although in simple tests it might actually work, it will fail under real world conditions). As a special exception, you can also call this method before having parsed anything.
That means you can only use this function to look at or manipulate text before or after complete JSON objects, not while the parser is in the middle of parsing a JSON object.
This function is useful in two cases: a) finding the trailing text after a JSON object or b) parsing multiple JSON objects separated by non-JSON text (such as commas).
incr_skip
$json->incr_skip
This will reset the state of the incremental parser and will remove the parsed text from the input buffer so far. This is useful after incr_parse
died, in which case the input buffer and incremental parser state is left unchanged, to skip the text parsed so far and to reset the parse state.
The difference to incr_reset
is that only text until the parse error occurred is removed.
incr_reset
$json->incr_reset
This completely resets the incremental parser, that is, after this call, it will be as if the parser had never parsed anything.
This is useful if you want to repeatedly parse JSON objects and want to ignore any trailing data, which means you have to reset the parser after each successful decode.
MAPPING
Most of this section is also taken from JSON::XS.
This section describes how the backend modules map Perl values to JSON values and vice versa. These mappings are designed to do the right thing in most circumstances automatically, preserving round-tripping characteristics (what you put in comes out as something equivalent).
For the more enlightened: note that in the following descriptions, lowercase perl refers to the Perl interpreter, while uppercase Perl refers to the abstract Perl language itself.
JSON -> PERL
object
A JSON object becomes a reference to a hash in Perl. No ordering of object keys is preserved (JSON does not preserver object key ordering itself).
array
A JSON array becomes a reference to an array in Perl.
string
A JSON string becomes a string scalar in Perl - Unicode codepoints in JSON are represented by the same codepoints in the Perl string, so no manual decoding is necessary.
number
A JSON number becomes either an integer, numeric (floating point) or string scalar in perl, depending on its range and any fractional parts. On the Perl level, there is no difference between those as Perl handles all the conversion details, but an integer may take slightly less memory and might represent more values exactly than floating point numbers. If the number consists of digits only, this module will try to represent it as an integer value. If that fails, it will try to represent it as a numeric (floating point) value if that is possible without loss of precision. Otherwise it will preserve the number as a string value (in which case you lose roundtripping ability, as the JSON number will be re-encoded to a JSON string). Numbers containing a fractional or exponential part will always be represented as numeric (floating point) values, possibly at a loss of precision (in which case you might lose perfect roundtripping ability, but the JSON number will still be re-encoded as a JSON number). Note that precision is not accuracy - binary floating point values cannot represent most decimal fractions exactly, and when converting from and to floating point, this module only guarantees precision up to but not including the least significant bit.
true, false
These JSON atoms become JSON::true
and JSON::false
, respectively. They are overloaded to act almost exactly like the numbers 1
and 0
. You can check whether a scalar is a JSON boolean by using the JSON::is_bool
function.
null
A JSON null atom becomes undef
in Perl.
shell-style comments ("# text")
As a nonstandard extension to the JSON syntax that is enabled by the relaxed
setting, shell-style comments are allowed. They can start anywhere outside strings and go till the end of the line.
tagged values ("(tag)value").
Another nonstandard extension to the JSON syntax, enabled with the allow_tags
setting, are tagged values. In this implementation, the tag must be a perl package/class name encoded as a JSON string, and the value must be a JSON array encoding optional constructor arguments. See OBJECT SERIALISATION, below, for details.
PERL -> JSON
The mapping from Perl to JSON is slightly more difficult, as Perl is a truly typeless language, so we can only guess which JSON type is meant by a Perl value.
hash references
Perl hash references become JSON objects. As there is no inherent ordering in hash keys (or JSON objects), they will usually be encoded in a pseudo-random order. This module can optionally sort the hash keys (determined by the canonical flag), so the same data structure will serialise to the same JSON text (given same settings and version of the same backend), but this incurs a runtime overhead and is only rarely useful, e.g. when you want to compare some JSON text against another for equality.
array references
Perl array references become JSON arrays.
other references
Other unblessed references are generally not allowed and will cause an exception to be thrown, except for references to the integers 0
and 1
, which get turned into false
and true
atoms in JSON. You can also use JSON::false
and JSON::true
to improve readability. encode_json [�,JSON::true] # yields [false,true]
JSON::true, JSON::false, JSON::null
These special values become JSON true and JSON false values, respectively. You can also use \1
and