/
githubmirror
/
libnet
Обзор
Документация
Войти
/
githubmirror
/
libnet
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
bin/map-pblock-types
16 строк
474 B
Sam Roberts
Do not package or distribute map-pblock-types
10 окт 2019, 00:12
10 окт 2019, 00:12
5f06bd4
Код
Авторство
О чём код?
#!/usr/bin/ruby -w # This utility is used to maintain the pblock mapping to strings in # src/libnet_internal.c, see the in-source comment in that file. open("include/libnet/libnet-structures.h").each do |line| #p line next unless line =~ /^#define (LIBNET_PBLOCK_)(\S+).*/ #p [$1, $2] type = $1+$2 name = $2.sub(/_H$/, "").downcase.inspect next if type == "LIBNET_PBLOCK_DO_CHECKSUM" puts " case #{type}:" puts " return (#{name});" end