Results 1 to 15 of 15

Thread: broadcast ip interface on windows xp

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: broadcast ip interface on windows xp

    I already told you:
    Qt Code:
    1. quint32 ip = entry.ip().toIPv4Address();
    2. quint32 mask = entry.netmask().toIPv4Address();
    3. quint32 broadcast = (ip & mask) | (0xFFFFFFFFU & ~mask);
    4. entry.setBroadcast(QHostAddress((broadcast)));
    To copy to clipboard, switch view to plain text mode 
    Actually the code is stolen from the Qt sources .

  2. The following user says thank you to marcel for this useful post:

    pawer (19th May 2007)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.