Solved

ptty to a specific  ip address

Posted on 2002-03-19
5
391 Views
Last Modified: 2013-12-23
I have a site that are moving (slowly) from serial to IP
They all user the same username to login (accounting software - cobol - not my choice).
The software uses a script to assign a terminal number based on the line eg tty1a1 = terminal 1 ptty2
= terminal 7 etc etc.

My problem.
Now they are moving to ip the user will get a random ptty session and the terminal number changes. the
stupid accounting program uses terminal numbers to identify such things as print jobs.

Can you make a user on a fixed ip address get a specifc ptty session ?  eg 198.168.1.1 get ptty0 and
or ptty1 etc etc
0
Comment
Question by:Zombite
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 6881802
which favour of UNIX are you using?

I don't thing you can assign the tty to a fix IP, but if you write a script, it can detect which tty the usr is using and then passed it to your application.



0
 
LVL 4

Author Comment

by:Zombite
ID: 6882307
Openserver SCO 5.0.5

The application (cobol) already runs a script that checks the tty# and sets the terminal number.
Mutter, I can change the script and... hopefully the cobol ppl won't overwrite it again. Just thought if there was any op sys method to detect ip and etc etc but if the script is the only way to go then I will re open my scipting book ;-)
0
 
LVL 38

Expert Comment

by:yuzh
ID: 6884380
I have used SCO OpenServer 5.X a few years ago, I think you end up have to write a script to get the remote IP and pass it to your application.

Do you have tcsh install on your system? tcsh by default it
have a Env var $REMOTEHOST to tell you the remote machine name or ip (you can convert the machine name back to ip if the out put is the machine name).

It is possible to do it with the other shell, but you need to do a lot more.
0
 
LVL 3

Accepted Solution

by:
UkWizard earned 100 total points
ID: 6887219
yep, only answer is to write a script ( or modify the current one ) so that it finds the IP address and then passes this to the program.

The cobol script may just run the 'tty' command to discover the tty port, in which case you could make a script to overwrite this variable.

Never tryed this personally though, be better to modify there script.
0
 
LVL 4

Author Comment

by:Zombite
ID: 6887984
Script is the wat to go it appears.
Thanks to all
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
Make the most of your online learning experience.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question