403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.190
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/src/linux-headers-6.8.0-45/tools/perf/trace/beauty/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/src/linux-headers-6.8.0-45/tools/perf/trace/beauty/socket.sh
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1

if [ $# -gt 0 ] ; then
	uapi_header_dir=$1
	beauty_header_dir=$2
else
	uapi_header_dir=tools/include/uapi/linux/
	beauty_header_dir=tools/perf/trace/beauty/include/linux/
fi

printf "static const char *socket_ipproto[] = {\n"
ipproto_regex='^[[:space:]]+IPPROTO_(\w+)[[:space:]]+=[[:space:]]+([[:digit:]]+),.*'

grep -E $ipproto_regex ${uapi_header_dir}/in.h | \
	sed -r "s/$ipproto_regex/\2 \1/g"	| \
	sort -n | xargs printf "\t[%s] = \"%s\",\n"
printf "};\n\n"

printf "static const char *socket_level[] = {\n"
socket_level_regex='^#define[[:space:]]+SOL_(\w+)[[:space:]]+([[:digit:]]+)([[:space:]]+/.*)?'

grep -E $socket_level_regex ${beauty_header_dir}/socket.h | \
	sed -E "s%$socket_level_regex%\2 \1%g"	| \
	sort -n | xargs printf "\t[%s] = \"%s\",\n"
printf "};\n\n"

printf 'DEFINE_STRARRAY(socket_level, "SOL_");\n'

Youez - 2016 - github.com/yon3zu
LinuXploit