Sponsored Content
Operating Systems Linux programming advice needed.... Post 47347 by trostycp on Sunday 8th of February 2004 08:51:44 PM
Old 02-08-2004
Question programming advice needed....

i'm a grad student taking a UNIX course and a networks course (i have a background in C++ and JAVA). i'm trying to combine the two classes.
My questions stems from a networks programming homework assignment below:
"Using the operating system and language of your choice, develop a program to set and monitor a serial interface. Display the interface status at the start of the program. Initialize the interface (DTR, RTS, 8 data bits, no parity, 19,200 bps). Report all interface status changes."

first question:
I want to try this on Linux RedHat (newbie)....can this program be done using shell commands (bash or korn)? Or are those too 'low-level' and i should write it in JAVA on the linux machine?

second question:
once i do start the programming (regardless of language)....if i compile and run it on the RedHat linux machine any idea whether i can connect serial ports (RJ-11 connection) to a computer running Windows XP Pro and not have any interference with the different OSs?
 

10 More Discussions You Might Find Interesting

1. Programming

urgent advice needed - gcc

what does the statement : static char a = "a"; store in the executable image. ?? I need to make a command line parameter exist AFTER the program finishes execution.. so that when i run the code next time ( without recompiling ).. i can work with the paramter.. for example: ... (5 Replies)
Discussion started by: a.k.aFireknight
5 Replies

2. Shell Programming and Scripting

'for' loop advice needed ....!!

/usr/sbin/ifconfig -a | grep "inet" | grep -v "inet6" | grep -v "127.0.0.1" | grep -v "0.0.0.0"|grep -v "192.168.100.2" | awk '{print $2}' I use above command to get IP addresses on AIX boxes.Values coming here are set to a variable "Host IPs.IP Addresses" in my fingerprinting engine. ... (4 Replies)
Discussion started by: ak835
4 Replies

3. Shell Programming and Scripting

Advice needed on using Script with NOHUP

All, I would like to know my below requirement can be achieved in any way in Shell Scripting? I will make this requirement of mine as understandable as I can. Requirement: I wrote a script 'my.script' which gets user-input tablenames and puts the same into an array. Also I get other inputs... (6 Replies)
Discussion started by: bharath.gct
6 Replies

4. UNIX for Advanced & Expert Users

'for' loop advice needed....!!

Scenario: Command used to capture IPs on a host: /usr/sbin/ifconfig -a | grep "inet" | egrep -v "inet6|0.0.0.0|192.168.100.2" | awk '{print $2}' Following for loop used to capture interface names: for INTERFACE in `/usr/sbin/ifconfig -a | nawk '$1 ~ /:$/ && $1 {sub(":$", "", $1); print... (3 Replies)
Discussion started by: ak835
3 Replies

5. Linux

Scripting advice needed

Evening all, Im trying to get a script that will: Select the most 3 recent files in a specific directory Run a command on them (like chmod) Ask of you would like to continue Copy the files to another directory If a linux guru could help me out, it would be very much appreciated. Thanks... (2 Replies)
Discussion started by: Wiggins
2 Replies

6. UNIX for Advanced & Expert Users

System + Network Programming, your advice required???

Dear friends, Before putting my questions forward, I would like to put some data infront of you, hope you will help me at the end. This website Cray-Cyber - Welcome provides free access to many supercomputers and mainframe computers. When you login through ssh, they provide you with a screen,... (0 Replies)
Discussion started by: gabam
0 Replies

7. Programming

System + Network Programming, your advice required???

Dear friends, Before putting my questions forward, I would like to put some data infront of you, hope you will help me at the end. This website Cray-Cyber - Welcome provides free access to many supercomputers and mainframe computers. When you login through ssh, they provide you with a screen,... (5 Replies)
Discussion started by: gabam
5 Replies

8. Shell Programming and Scripting

Need Advice for This Programming way

Hi All, I am working in production support environment And I have a lot of checks done daily on system And depended on values I take specific decision I am going to develop script to do general operation task But my problem is this script will be a running process 24 hours I... (5 Replies)
Discussion started by: maxosmanpad
5 Replies

9. Shell Programming and Scripting

[Solved] Permission problem, programming advice needed, Perl

Hi all, I have written a wrapper script in Perl which will be used on AIX, Linux and Windows and I do not want to change any code for the needs for a specific OS if avoidable. It works fine so far on all 3 OSes, not blowing up any stacks any more, but I am unsure how to handle writing log files... (7 Replies)
Discussion started by: zaxxon
7 Replies

10. UNIX for Dummies Questions & Answers

Issue with ACL's (Help/Advice Needed)

Hi Experts,,, Need your help/advice on how to fix this I have 2 users under same group (primary group) and i want to give 777 permissions on a directory to one dir owned by user1 when granted i can see than from getfacl but when i actually login as user2 i can touch a file . ... (3 Replies)
Discussion started by: maddyfreaks1
3 Replies
LDATTACH(8)						     Linux Programmer's Manual						       LDATTACH(8)

NAME
ldattach - attach a line discipline to a serial line SYNOPSIS
ldattach [-dhV78neo12] [-s speed] ldisc device DESCRIPTION
The ldattach daemon opens the specified device file (which should refer to a serial device) and attaches the line discipline ldisc to it for processing of the sent and/or received data. It then goes into the background keeping the device open so that the line discipline stays loaded. The line discipline ldisc may be specified either by name or by number. In order to detach the line discipline, kill(1) the ldattach process. With no arguments, ldattach prints usage information. LINE DISCIPLINES
Depending on the kernel release, the following line disciplines are supported: TTY(0) The default line discipline, providing transparent operation (raw mode) as well as the habitual terminal line editing capabilities (cooked mode). SLIP(1) Serial Line IP (SLIP) protocol processor for transmitting TCP/IP packets over serial lines. MOUSE(2) Device driver for RS232 connected pointing devices (serial mice). PPP(3) Point to Point Protocol (PPP) processor for transmitting network packets over serial lines. STRIP(4) AX25(5) X25(6) Line driver for transmitting X.25 packets over asynchronous serial lines. 6PACK(7) R3964(9) Driver for Simatic R3964 module. IRDA(11) Linux IrDa (infrared data transmission) driver - see http://irda.sourceforge.net/ HDLC(13) Synchronous HDLC driver. SYNC_PPP(14) Synchronous PPP driver. HCI(15) Bluetooth HCI UART driver. GIGASET_M101(16) Driver for Siemens Gigaset M101 serial DECT adapter. PPS(18) Driver for serial line Pulse Per Second (PPS) source. OPTIONS
-d | --debug Causes ldattach to stay in the foreground so that it can be interrupted or debugged, and to print verbose messages about its progress to the standard error output. -h | --help Prints a usage message and exits. -V | --version Prints the program version. -s value | --speed value Set the speed of the serial line to the specified value. -7 | --sevenbits Sets the character size of the serial line to 7 bits. -8 | --eightbits Sets the character size of the serial line to 8 bits. -n | --noparity Sets the parity of the serial line to none. -e | --evenparity Sets the parity of the serial line to even. -o | --oddparity Sets the parity of the serial line to odd. -1 | --onestopbit Sets the number of stop bits of the serial line to one. -2 | --twostopbits Sets the number of stop bits of the serial line to two. SEE ALSO
inputattach(1), ttys(4) AUTHOR
Tilman Schmidt (tilman@imap.cc) AVAILABILITY
The ldattach command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. Linux 2.6 14 January 2008 LDATTACH(8)
All times are GMT -4. The time now is 06:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy