swirl Guide to OmniMark 6   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
      Other Library Functions  
function   net-long   Available in:
Professional
Enterprise

Library: omnetutl - miscellaneous network utilities
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 ] [ OMX ] [ ERRORS ]

OmniMark 6.5 Documentation Generated: December 23, 2002 at 6:25:30 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-2002.