Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Define different ports for one Service Post 302076332 by Jeremy3 on Monday 12th of June 2006 09:45:34 AM
Old 06-12-2006
Define different ports for one Service

Hi all,

Is it possible to define different ports for one services.
For examplehave I've a SMPP service on port 6000, and I want add
port 6001, and 6002, and 6003, for the SMPP service.

If it's possible? how can we proceed? is it just by modifiying the /etc/services file?

Thanks for your help,

Jeremy

Last edited by Jeremy3; 06-13-2006 at 11:37 AM..
 

5 More Discussions You Might Find Interesting

1. Programming

#define

Hello, I would like to conditionaly comment in my code source some fields from arrays. So I use the property ## from the #define definition. my code: ... #define slet /##* #define etsl *##/ ... const T_SVT_ADLL_A653_DESC A_DESC = { { slet qwerty etsl SLICING,... (3 Replies)
Discussion started by: cypleen
3 Replies

2. Programming

help with #define in C

if i do this in C #define NUM 1234512345 then how come i cant print it out using int main(int argc, char **argv) { printf("%d\n", NUM); return 0; } well the result is -1219236538, why isnt it 1234512345 ? (7 Replies)
Discussion started by: omega666
7 Replies

3. Programming

#define in c

Hi, I had a head file, looks like #define MIN_NUM 10 #define MAX_NUM 10 is there any way to get "MAX_NUM" from 10? thanks. peter (9 Replies)
Discussion started by: laopi
9 Replies

4. Linux

Packages that monitor OS configs and service/ports?

I have several Redhat servers and workstations that I need to be able to monitor for any changes and be notified of any changes to the OS. The features I need to specifically monitor are: ports - opening of new ports that are not already in a whitelist services - any starting or attempts to start... (1 Reply)
Discussion started by: JCDinPGH
1 Replies

5. UNIX for Beginners Questions & Answers

Run one service after another service has finished - systemd

Hi all I would like to know how to run task2.service after task1.service has finished. task1.service has a timer (task1.timer), that makes it run every 5 minutes OnCalendar=*:0/5task2.service is basically a script, that has to work on the files created after task1 has finished. This is what I... (2 Replies)
Discussion started by: guilliber
2 Replies
GETSERVENT(3)						     Linux Programmer's Manual						     GETSERVENT(3)

NAME
getservent, getservbyname, getservbyport, setservent, endservent - get service entry SYNOPSIS
#include <netdb.h> struct servent *getservent(void); struct servent *getservbyname(const char *name, const char *proto); struct servent *getservbyport(int port, const char *proto); void setservent(int stayopen); void endservent(void); DESCRIPTION
The getservent() function reads the next line from the file /etc/services and returns a structure servent containing the broken out fields from the line. The /etc/services file is opened if necessary. The getservbyname() function returns a servent structure for the line from /etc/services that matches the service name using protocol proto. If proto is NULL, any protocol will be matched. The getservbyport() function returns a servent structure for the line that matches the port port given in network byte order using protocol proto. If proto is NULL, any protocol will be matched. The setservent() function opens and rewinds the /etc/services file. If stayopen is true (1), then the file will not be closed between calls to getservbyname() and getservbyport(). The endservent() function closes /etc/services. The servent structure is defined in <netdb.h> as follows: struct servent { char *s_name; /* official service name */ char **s_aliases; /* alias list */ int s_port; /* port number */ char *s_proto; /* protocol to use */ } The members of the servent structure are: s_name The official name of the service. s_aliases A zero terminated list of alternative names for the service. s_port The port number for the service given in network byte order. s_proto The name of the protocol to use with this service. RETURN VALUE
The getservent(), getservbyname() and getservbyport() functions return the servent structure, or a NULL pointer if an error occurs or the end of the file is reached. FILES
/etc/services services database file CONFORMING TO
BSD 4.3 SEE ALSO
getprotoent(3), getnetent(3), services(5) BSD
2001-07-25 GETSERVENT(3)
All times are GMT -4. The time now is 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy