Linux X.25 subsystem development
 help / color / mirror / Atom feed
From: Bahri Okuroglu <bahrio@yahoo.com>
To: Jean-Francois Gobin <gobin@gobinjf.be>, linux-x25@vger.kernel.org
Subject: Re: Help with X.25 tests
Date: Sun, 8 Jan 2006 02:41:33 -0800 (PST)	[thread overview]
Message-ID: <20060108104133.32263.qmail@web54109.mail.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0601080844450.11793@ik118.ikexpress.com>

Possibly there is some modified slattach to support
x25_asy, but I never could find it, and I did modified
it for my own purposes. 

Download the slattach code and put below in a file
(say x25asy.c) in the lib folder. Add your
x25asy_hwtype struct to the hw.c file also, and
re-build slattach. 

Mine version has a bit more code, to support DCE and
DTE operations, and below code is extracted from my
code and not compiled and not tested. FYI

--------------------------------
#include "config.h"


#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/if.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <linux/if_arp.h>
#include "lapb.h"
#include "support.h"
#include "pathnames.h"
#include "intl.h"
#define  EXTERN


/* Set the line discipline of a terminal line. */
static int
X25_set_disc(int fd, int disc)
{
  if (ioctl(fd, TIOCSETD, &disc) < 0) {
	fprintf(stderr, _("X25_set_disc(%d): %s\n"), disc,
strerror(errno));
	return(-errno);
  }
  return(0);
}


static int
do_x25(int fd)
{
  if (X25_set_disc(fd, N_X25) < 0) return(-1);
  return(0);
}


struct hwtype x25asy_hwtype = {
  "x25asy",	NULL, 		ARPHRD_X25,	0,
  NULL,		NULL,		NULL,		do_x25
};

---------------------------------------





--- Jean-Francois Gobin <gobin@gobinjf.be> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I must miss something :
> 
> # slattach -s 9600 -p x25 /dev/ttyS0
> Cannot change line discipline to `x25'.
> 



		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


  reply	other threads:[~2006-01-08 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060107185036.24242.qmail@web54113.mail.yahoo.com>
2006-01-08  7:45 ` Help with X.25 tests Jean-Francois Gobin
2006-01-08 10:41   ` Bahri Okuroglu [this message]
2006-01-08 13:52     ` Jean-Francois Gobin
2006-01-07 18:56 Bahri Okuroglu
  -- strict thread matches above, loose matches on Subject: below --
2006-01-07 18:03 Jean-Francois Gobin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060108104133.32263.qmail@web54109.mail.yahoo.com \
    --to=bahrio@yahoo.com \
    --cc=gobin@gobinjf.be \
    --cc=linux-x25@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox