Using Different port for Daytime Service


 
Thread Tools Search this Thread
Top Forums Programming Using Different port for Daytime Service
# 1  
Old 02-25-2012
Using Different port for Daytime Service

Hi all, is it possible to use a different port number for daytime service. By default the port number of daytime service is 13, so what if I want to get the time from a different port number e.g say 9000 (or any other port).
I guess this would remain the same on the server side !
Code:
servaddr.sin_port = htons (13);

So, to specify the port does the user defined port number should be the INADDR_ANY ?
Code:
servaddr.sin_add.s_addr = htonl(INADDR_ANY);

has anyone worked on this before.
Thanks.
# 2  
Old 02-25-2012
If you don't change the server port, the server port won't change. Change the server port and the client port.
# 3  
Old 02-25-2012
can you explain your comment ? Thanks

---------- Post updated at 08:09 PM ---------- Previous update was at 06:48 PM ----------

Thanks Corona, for helping me out with the solution.... this was what I did and it worked.
Code:
servaddr.sin_port = htons (PORT_NO);

where PORT_NO is supplied by user as an argument.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

NAGIOS Service not able to open port on AIX 7.1

I have an AIX 7.1 LPAR where Nagios agent was installed for monitoring. The issue is that when I start the nagios service (ncpa_listener), it starts but does not open the 5693 port it requires for communication. On all other LPARs the service opens the port and is listening. I tried reinstalling... (4 Replies)
Discussion started by: wibhore
4 Replies

2. UNIX for Beginners Questions & Answers

Ping the service with out port number

I got the service status through nc on remote network but 2 services doesn't have port number.how to get the other 2 services status with out port number .pls provide the solution to me. (1 Reply)
Discussion started by: userexperience
1 Replies

3. Shell Programming and Scripting

Ping the service with out port number on remote network

I got the service status through nc on remote network but 2 services doesn't have port number.how to get the other 2 services status with out port number .pls provide the solution to me. I need to develop with is in a script (2 Replies)
Discussion started by: kannansoft1985
2 Replies

4. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

5. Solaris

Cabling and adapters to communicate to service processor serial port from Windows PC with USB port.

Hello, I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build. The first part is what confuses me -the cabling. I am coming from a Windows machine (w/appropriate... (5 Replies)
Discussion started by: joboy
5 Replies

6. AIX

Finding service based on port number

is it possible to find out which Service is running on the basis of port no which is open/listening? Regards Manoj (2 Replies)
Discussion started by: manoj.solaris
2 Replies

7. Linux

Linux Daytime

Hi Guys. My Name is Luca. This is a first time that write on these fantastic forum. I hope that someone could help me. I'm working on redhat As 4.0. I'm using the daytime service. I have enable the daytime service and it seems work. From my pc I do: C:\>ftp ftp> open 10.99.99.4 13... (1 Reply)
Discussion started by: bogabug
1 Replies

8. Solaris

list service with port number

Hi all, I want to list all service is running now with the specific port number (5 Replies)
Discussion started by: sharkux
5 Replies

9. Programming

why daytime don't work?

Following code is detecting solaris daytime,when I run it,I can't get any result,code is follows: #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFFSIZE 150 int main(){ ... (2 Replies)
Discussion started by: konvalo
2 Replies
Login or Register to Ask a Question