ETHO interfacing linux IP:stack?

Discussion in 'Linux Networking' started by no.top.post, Mar 22, 2012.

  1. no.top.post

    no.top.post Guest

    I'm writing this while I'm thinking it through, so I'll have a record.
    Duke mentioned the problem of email for LNO.
    I don't like LNO much, compared to LEO, which I use all the time.
    But LNO can run on a netbook using a framebuffer, without the
    full X-window system.

    So let's think this problem through.
    And correct my mistaken assumptions and conclusions:-

    N-O was originaly designed for RS232-modem,
    and the full <IP/TCP stack> was in N-O [of course].

    So for <send string1 to IP/port>,
    all stages/levels, from the app's passing the string,
    down to the serial port driving the modem,
    was handled by N-O [of course].

    Under LEO, the underlying linux does the internet handling.

    Without anlysing the source code, I want to know how the
    N-O part of LEO interfaces with linux.

    Does the fact that "everything in *nix is a file" make this
    easy?

    Since linux, which previously drove a modem via a RS232,
    can easily be 'reconfigured' to drive a radio-modem via a
    USB; and passing the same byte-stream in both cases, I'm
    guessing that just the appropriate file-driver are needed.

    So the byte-stream is just fed to any character-type
    file-device, and the appropriate driver handles it.
    So the input-feeder need not be concerned what is
    receiving the input.

    If that is the case, and although the netbook has no actual
    RS232, if I create a /dev/tty0 [pseudo]file and [symbolicly]
    link it to the /dev/<existingUSB> , which is connected to
    the remote IP:port via linux, could I communicate with the
    remote IP:port via LNO? Would LNO treat the /devtty0/
    as if it was a PC's "COM" port?
    I guess not, since during boot, linux would see that there
    is NO RS232-port and .....?

    If not, I suspect that facilities exist to easily connect into
    the IP:stack at various levels, and connecting at the highest
    level would be most convenient, via an Oberon <-> C
    interface ?

    Thanks for any ideas,

    == Chris Glur.
     
    no.top.post, Mar 22, 2012
    #1
    1. Advertisements

  2. no.top.post

    Tauno Voipio Guest


    Would you please make a glossary of the TLA's you used?

    TLA = three letter abbreviation

    Please get a basic text on TCP/IP networking, and read it first.
    It will be very difficult to answer the above questions, as
    it doen not make sense with the way SMTP mail is working.
     
    Tauno Voipio, Mar 22, 2012
    #2
    1. Advertisements

  3. no.top.post

    J G Miller Guest

    LEO == Low Earth Orbit
     
    J G Miller, Mar 22, 2012
    #3
  4. no.top.post

    Lew Pitcher Guest

    On Thursday 22 March 2012 16:07, in comp.os.linux.networking,
    Also
    LEO == LSI-Embedded realtime Operating system

    http://cnu1.springnote.com/pages/3985325/attachments/1973837

    But I doubt that this is the LEO that the OP refers to.

    I can't find any Google references to LNO or N-O wrt Linux networking,
    though.
     
    Lew Pitcher, Mar 22, 2012
    #4
  5. no.top.post

    Lew Pitcher Guest

    On Thursday 22 March 2012 16:27, in comp.os.linux.networking,
    But, it apparently stands for

    Linux Eth Oberon
    and
    LNO stands for Linux Native Oberon
    and is apparently the runtime and support for the Oberon programming
    language.
     
    Lew Pitcher, Mar 22, 2012
    #5
  6. no.top.post

    Roger Blake Guest

    LEO == Lyons Electronic Office

    --
    -----------------------------------------------------------------------------
    Roger Blake (Change "invalid" to "com" for email. Google Groups killfiled.)

    "Climate policy has almost nothing to do anymore with environmental
    protection... the next world climate summit in Cancun is actually
    an economy summit during which the distribution of the world's
    resources will be negotiated." -- Ottmar Edenhofer, IPCC
    -----------------------------------------------------------------------------
     
    Roger Blake, Mar 22, 2012
    #6
  7. LEO == Law Enforcement Official

    Don'cha watch NCIS? (Never Call It Silly)

    Jonesy
     
    Allodoxaphobia, Mar 23, 2012
    #7
  8. LNO = Linux Native Oberon:

    LEO = Linux ETH Oberon

    USB = Universal Serial Bus

    TCP = Transmission Control Protocol

    Regards,
    Chris Burrows

    Astrobe: ARM Oberon Development System
    http://www.astrobe.com
     
    Chris Burrows, Mar 23, 2012
    #8
  9. no.top.post

    no.top.post Guest

    Some say 'foo'. Some say baa. Or being Friday night, is it 'bar'?
    It's not about SMTP. Surely once TCP/IP is 'hooked into',
    SMTP should work if telnet can work ?Someone who KNOWS how linux implements TCP/IP, would know
    how the system described below would/could be 'spliced in'.
    -------------------
    ReadMe: Linux Native Oberon System 3 Release 06.Jan.2002

    Linux Native Oberon is an emulation of Native Oberon for Linux. The goal is
    binary compatibility with Native Oberon. For information about Native
    Oberon see the homepage at http://www.oberon.ethz.ch/native/
    ....
    Linux Native Oberon doesn't change the interface of any module. All driver
    modules which are changed in LNO are statically linked in oberon.lno. If you
    first install Native Oberon and then LNO on an own partition you will be
    able to start oberon from both, PC Native or from Linux.
    ....
     
    no.top.post, Mar 23, 2012
    #9
  10. no.top.post

    no.top.post Guest

    The names of the arguments are arbitrary.
    It's only the underlying concepts that matter.
    I.e. HOW2 connect the program that 'rides on linux',
    to the ppp layer.

    The more I try to 'translate' from the original text,
    the more I add distortion.
     
    no.top.post, Mar 24, 2012
    #10
  11. no.top.post

    Tauno Voipio Guest



    I'm pretty sure that you do not want to connect directly
    to the PPP (packet transport) layer from an application program.

    The electronic mail, as we know it in the Internet, runs on
    the SMTP (and POP or IMAP) protocols. All of these protocols
    are running on TCP stream transport. TCP uses IP for moving
    the segments as IP packets. IP can use several different
    protocols for moving the packets. Some of them are SLIP,
    PPP and Ethernet (with ARP).

    The stack looks like this:

    SMTP POP IMAP
    TCP
    IP
    SLIP PPP Ethernet
    Modem Net cable

    Helper protocols left out.

    In Linux, the way to access the protocol stack is via the
    C library, libc, using socket connections. There are
    different kinds of sockets for connecting to different
    layers of the stack.

    My understanding of Oberon is that it contains interface
    modules from Oberon code to the C library, which is the
    native connection in Linux.

    There are special interfaces, tunnel and ethertap, for
    creating non-standard network interfaces at the network
    or physical layer.

    The question is:

    What are you really attempting to achieve?
     
    Tauno Voipio, Mar 24, 2012
    #11
  12. no.top.post

    no.top.post Guest

    I read the book - ten years ago.
    This needs thinking beyond-the-book.
    It's not restricted to SMTP.

    Here's a paste of the interfacing code of 'a related/family'
    which was also modified to 'ride on linux':-
    <><><><>
    cmdStr := "(/usr/lib/sendmail -oi -t < /tmp/Mailer.Send; rm /tmp/Mailer.Send) &";
    Unix.System (SYSTEM.ADR(cmdStr), LEN(cmdStr));
    (* Unix.System("/usr/lib/sendmail -oi -t < /tmp/Mailer.Send"); *)
    (* Files.Delete("/tmp/Mailer.Send", res) *)
    <><><><>
    If he was able to interface with the linux screen & mouse and fetch
    http, I'm wondering why he used such a naive hack for sendingMail,
    given that the system must have had a mailer, in the original
    'nativeX86'/non-linux-based version.

    Of course I may study the source code, but I want to try to
    analyse it at a higher-level first.

    == TIA.
     
    no.top.post, Mar 24, 2012
    #12
  13. no.top.post

    no.top.post Guest

    ---> That's the key:libc, using socket connections.
    I'd like to connect to linux at the highest/application level.
    Currently and for the forseeable future good text processing is the
    most important facility for general computing.

    ETHO [family] is the best -- IMO.
    ETHO dates back to the 90's with versions:
    DOSbased, Win?, NativeX86
    and a later version LinuxNativeOberon,
    then LEO [a pasted the full name previously].

    The source code of all modules for the different versions,
    is identical, except for the hardware interfacing.

    Because I had problems of my ISP introducing TxAuthenticate,
    I had to look into the mailer's source code. But I want to be able
    to do USEnet & http also- like I can onj THIS LEO. I've been using
    LEO for some years. And I open exta copies to handle problematic
    tasks, perhaps the way an emacs-guru would.

    I've installed non-X linux onto a CompactFlash on a netbook,
    which allows LNO to run [but not LEO].

    When LNO was installed on a PC with a serial-port, it could
    ppp via the modem. But the netbook has no serial port, and
    I have already sweated-bullets to get the netbook under
    linux to communicate with a wireless-modem.

    So I want to be able to use the superior TextUserInterface of
    LNO, and connect to the internet via the linux - wireless modem.

    == Chris Glur.
     
    no.top.post, Mar 24, 2012
    #13
  14. no.top.post

    Tauno Voipio Guest

    Here, you're getting out of Oberon and running a
    subordinate process instead of interfacing to the
    mail system.

    This is the same as a shell commands:

    /usr/lib/sendmail -oi -t </tmp/Mailer.Send
    rm /tmp/Mailer.Send

    I sure hope that the command is not the original Sendmail.
    It is notoriously difficult to configure correctly. Exim
    is one better substitute.
     
    Tauno Voipio, Mar 25, 2012
    #14
  15. no.top.post

    Jorgen Grahn Guest

    ["Followup-To:" header set to comp.os.linux.networking.]

    All Unix mail systems have a /usr/lib/sendmail, so this name doesn't
    indicate which one is running.

    /Jorgen
     
    Jorgen Grahn, Mar 25, 2012
    #15
  16. no.top.post

    no.top.post Guest

    Yes I just put that in there, for you to feel familiar and comfortable.
    It's rather trivial to write/modify the complete pop/smtp in ETHO.
    Here's some more code snippets, which I had to look at to add TxAuthenticate:
    From the RFC where you have to give: UserID
    Connect(S, host, POP, res);
    IF res = 0 THEN NS.ReadString(S, s);
    IF s[0] = "+" THEN SendCmd(S, "user", user);
    ------------> which goes to:
    -> SendCmd(S: NS.Connection; cmd, arg: ARRAY OF CHAR);
    -> NS.WriteBytes(S, 0, i+2, buf)
    WriteBytes (C: Connection; pos, len: LONGINT; VAR buf: NetBase.Data);
    -> TYPE
    IPAdr = NetBase.IPAdr;
    Connection = POINTER TO ConnectionDesc; <-- C: Connection
    ConnectionDesc = RECORD
    res: INTEGER;
    END;

    TYPE
    IPAdr = ARRAY 4 OF CHAR; <-- NetBase.IPAdr;
    Data = ARRAY OF SYSTEM.BYTE;
    Sockaddrin = RECORD
    sinfamily: INTEGER;
    sinport: INTEGER;
    -> sinaddr: IPAdr;
    sinzero: ARRAY 8 OF CHAR
    END;
    ============================
    Now lets get back to the real problem:
    I'll consider the 'Mailer' because I'm most familiar with it
    compared to News & http-fetch.

    LNO is running on linux. `pstree` shows that it's a descendant of `bash`

    A=>LNO: Mailer < ........<ser-port < modem

    B=> Linux < pppd chat script<...<tttyUSB0/1 <wireless-modem

    The final target hardware is a netbook, which has NO ser-port,
    but I can test on a PC which has USB and ser-port.

    I connect to the-net via the linux-chat-script;
    and then I tried to 'talk via LNO' by having /dev/tty1 linked to
    /dev/ttyUSB0. It fails and LNO hasn't got `ping`to help test.

    Firstly I linked BOTH /dev/modem for Linux and
    /dev/tty1 for LNO /dev/ttyUSBO, but that
    seems strange.

    This is really a problem for kernel-programmers?
     
    no.top.post, Mar 25, 2012
    #16
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.