swirl
Guide to OmniMark 8   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 ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.