1POE::Component::Client:U:sIedrenCto:n:tArgiebnutt(e3d)PPeOrEl::DCoocmupmoennetnatt:i:oCnlient::Ident::Agent(3)
2
3
4

NAME

6       POE::Component::Client::Ident::Agent - A component to provide a
7       one-shot non-blocking Ident query.
8

SYNOPSIS

10         use POE::Component::Client::Ident::Agent;
11
12         my $poco = POE::Component::Client::Ident::Agent->spawn(
13               PeerAddr => "192.168.1.12", # Originating IP Address
14               PeerPort => 12345,          # Originating port
15               SockAddr => "192.168.2.24", # Local IP address
16               SockPort => 69,             # Local Port
17               Socket   => $socket_handle, # Or pass in a socket handle
18               IdentPort => 113,           # Port to send queries to on originator
19                                           # Default shown
20               BuggyIdentd => 0,           # Dealing with an Identd that isn't
21                                           # RFC compatable. Default is 0.
22               TimeOut => 30,              # Adjust the timeout period.
23               Reference => $scalar        # Give the component a reference
24         );
25
26         sub _child {
27          my ($action,$child,$reference) = @_[ARG0,ARG1,ARG2];
28
29          if ( $action eq 'create' ) {
30            # Stuff
31          }
32         }
33
34         sub ident_agent_reply {
35         }
36
37         sub ident_agent_error {
38         }
39

DESCRIPTION

41       POE::Component::Client::Ident::Agent is a POE component that provides a
42       single "one shot" look up of a username on the remote side of a TCP
43       connection to other components and sessions, using the ident (auth/tap)
44       protocol.  The Ident protocol is described in RFC 1413
45       <http://www.faqs.org/rfcs/rfc1413.html>.
46
47       The component implements a single ident request. Your session spawns
48       the component, passing the relevant arguments and at some future point
49       will receive either a 'ident_agent_reply' or 'ident_agent_error',
50       depending on the outcome of the query.
51
52       If you are looking for a robust method of managing Ident::Agent
53       sessions then please consult the documentation for
54       POE::Component::Client::Ident, which takes care of Agent management for
55       you.
56

CONSTRUCTOR

58       "spawn"
59           Takes either the arguments:
60
61             "PeerAddr", the remote IP address where a TCP connection has originated;
62             "PeerPort", the port where the TCP has originated from;
63             "SockAddr", the address of our end of the connection;
64             "SockPort", the port of our end of the connection;
65
66           OR:
67
68             "Socket", the socket handle of the connection, the component will work out all the
69             details for you. If Socket is defined, it will override the settings of the other arguments,
70             except for:
71
72             "IdentPort", which is the port on the remote host where we send our ident queries.
73             This is optional, defaults to 113.
74
75           You may also specify BuggyIdentd to 1, to support Identd that
76           doesn't terminate lines as per the RFC.
77
78           You may also specify TimeOut between 5 and 30, to have a shorter
79           timeout in seconds on waiting for a response from the Identd.
80           Default is 30 seconds.
81
82           Optionally, you can specify Reference, which is anything that'll
83           fit in a scalar. This will get passed back as part of the response.
84           See below.
85
86           Returns an POE::Component::Client::Ident::Agent object, which has
87           the following methods.
88

METHODS

90       "session_id"
91           Returns the POE session ID of the component.
92
93       "shutdown"
94           Terminates the component.
95

OUTPUT

97       All the events returned by the component have a hashref as ARG0. This
98       hashref contains the arguments that were passed to the component. If a
99       socket handle was passed, the hashref will contain the appropriate
100       PeerAddr, PeerPort, SockAddr and SockPort. If the component was spawned
101       with a Reference parameter, this will be passed back as a key of the
102       hashref.
103
104       The following events are sent to the calling session by the component:
105
106       "ident_agent_reply"
107           Returned when the component receives a USERID response from the
108           identd. ARG0 is hashref, ARG1 is the opsys field and ARG2 is the
109           userid or something else depending on whether the opsys field is
110           set to 'OTHER' ( Don't blame me, read the RFC ).
111
112       "ident_agent_error"
113           Returned when the component receives an ERROR response from the
114           identd, there was some sort of communication error with the remote
115           host ( ie. no identd running ) or it had some other problem with
116           making the connection to the other host. No matter. ARG0 is
117           hashref, ARG1 is the type of error.
118

AUTHOR

120       Chris Williams, <chris@bingosnet.co.uk<gt>
121

LICENSE

123       Copyright © Chris Williams.
124
125       This module may be used, modified, and distributed under the same terms
126       as Perl itself. Please see the license that came with your Perl
127       distribution for details.
128

SEE ALSO

130       RFC 1413 <http://www.faqs.org/rfcs/rfc1413.html>
131
132       POE::Session
133
134       POE::Component::Client::Ident
135
136
137
138perl v5.30.1                      2020-0P2O-E0:6:Component::Client::Ident::Agent(3)
Impressum