Net::S...Dropper(3pm)
π Net::S...Dropper(3pm) β the perl manual page, bestie edition π
okay so this is the manual page for Net::SIP::Dropper from the User Contributed Perl Documentation, section 3pm. it's a whole vibe. let's get into it π«Ά
β¨ NAME β¨
Net::SIP::Dropper β drops SIP messages based on callback. that's it. that's the job. it sees a message and it's like "not today" π
πΈ SYNOPSIS πΈ
use Net::SIP::Dropper::ByIPPort;
my $drop_by_ipport = Net::SIP::Dropper::ByIPPort->new(
database => '/path/to/database.drop',
methods => [ 'REGISTER', '...', '' ],
attempts => 10,
interval => 60,
);
use Net::SIP::Dropper::ByField;
my $drop_by_field = Net::SIP::Dropper::ByField->new(
methods => [ 'REGISTER', '...', '' ],
'From' => qr/sip(?:vicious|sscuser)/,
'User-Agent' => qr/^friendly-scanner$/,
);
my $drop_subscribe = sub {
my ($packet,$leg,$from) = @_;
# drop all subscribe requests and responses
return $packet->method eq 'SUBSCRIBE' ? 1:0;
};
my $dropper = Net::SIP::Dropper->new(
cbs => [ $drop_by_ipport, $drop_by_field, $drop_subscribe ]);
my $chain = Net::SIP::ReceiveChain->new(
[ $dropper, ... ]
);
like look at that. three little droppers, one chain, zero unwanted messages. iconic honestly πβ¨
π¦ DESCRIPTION π¦
so what does it do? it drops messages. that's the whole thing, no cap.
which means: if an incoming message matches the settings, it does no further processing in the Net::SIP chain, and it does not send something back either. it justβ¦ doesn't. ghosting, but make it infrastructure π
some useful droppers are already defined for you in Net::SIP::Dropper::ByIpPort and Net::SIP::Dropper::ByField. go off, queens π
π CONSTRUCTOR π
new ( ARGS )
ARGS is a hash with the key "cb" or "cbs" β pick your fighter:
"cb"is a single callback to be processed π«"cbs"is an arrayref with callbacks π§
here's the rule, and it's important so listen up: if one of the callbacks returns true, the message will be dropped. periodt. if all of the callbacks return false, the message will be forwarded in the chain. that's the vibe check β
Returns a new dropper object to be used in the chain. slay π
fr fr, remember: any singletrue= gone. allfalse= it moves on. no in-between, no maybes π
and that's the whole page, bestie!! πβ
this lil masterpiece lives in the User Contributed Perl Documentation for perl v5.40.1, dated 2025-12-07 β mwah, sending love to whoever wrote it, they ate ππ
π¦ where this page comes from
- ubuntu resolute: libnet-sip-perl 0.840-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-sip-perl 0.840-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms