swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

net-long

 
 

Library: Network utilities (OMNETUTL) legacy library
Include: omnetutl.xin

Declaration

  net-long


Purpose

Use net-long to match a single long network number in a stream of bytes/octets.

Example

The following program takes a string consisting of three network order numbers and matches them individually. The output (on Windows) is two numbers that are the same (the first two numbers), followed one number that is different (the third number). They are output in host order.


  include "omnetutl.xin"

  process
     local stream network-bytes initial { "%1#%2#%3#%4#%1#%2#%3#%4#%4#%3#%3#%4#" }
     local integer host-long

     repeat scan network-bytes
        match net-long => x
           set host-long to from-net-long (x)
           output "d" % host-long || " "
     again
     output "%n"

        Other Library Functions
   from-net-long
   NETGetHostIP
   NETGetHostName
   NETIsVersionCompatible
   NETLibraryVersion
   net-long
   to-net-long
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:33 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.