imagectn via inetd

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jsalk
DCMTK Tester
Posts: 13
Joined: Thu, 2004-11-25, 15:59

imagectn via inetd

#1 Post by jsalk » Tue, 2004-12-07, 14:47

Hi all,

is there a clean way to have imagectn managed by the (x)inetd
service?

I have added the following line to /etc/inetd.conf:

acr-nema stream tcp nowait root /usr/sbin/tcpd /usr/bin/imagectn +ac -to 60 -c /etc/dcmtk/imagectn.cfg

inetd is now listening on port 104 for incoming connections:

# grep acr-nema /etc/services
acr-nema 104/tcp dicom # ACR-NEMA Digital Imag. & Comm. 300
acr-nema 104/udp dicom # ACR-NEMA Digital Imag. & Comm. 300
# netstat -ap | grep acr-nema
tcp 0 0 *:acr-nema *:* LISTEN 31011/inetd
#

This is the global configuration section from /etc/dcmtk/imagectn.cfg:

# Global Configuration Parameters
NetworkType = "tcp"
NetworkTCPPort = 104
MaxPDUSize = 16384
MaxAssociations = 16
Display = "no"

When I try to connect on port 104, I get the following error
messages (I used `telnet' just to check for basic connectivity):

$ telnet localhost 104
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
imagectn: Error initialising network:
0006:031c TCP Initialization Error: Address already in use
Connection closed by foreign host.

Maybe I am missing the obvious, but it seems that imagectn is
spawned by inetd as intended, but then tries to (re)establish a
new socket at the given port number regardless of whether it's
managed by inetd or not, which - in turn - makes it unsuitable
as an (x)inetd candidate. Is my assumption correct?

Best regards - Juergen

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier » Tue, 2004-12-07, 15:10

Your assumption is correct: imagectn currently does not support (x)inetd. There is an entry in our to-do list but we haven't had time to implement the required changes yet.

Btw, imagectn does natively support the TCP wrapper if compiled accordingly (see option --access-control).

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest