Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. libtins library usage

libtins library usage

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 640 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nisha
    wrote on last edited by VRonin
    #1

    hi,

    can any one help me out on how to get the pdu type using the library libtins
    ie like is it tcp,udp or igmp or icmp ...

    by giving these statements

    const IP ip = some_pdu.rfind_pdu<IP>();
    std::cout << "pdu type:" << ip.pdu_type()<< std::endl;

    where pdu type is of enumerated datatype

    i get the output in the form of numbers.......

    how do we get an enumerated datatype in string format?

    thank you

    ~ Locked as not Qt Related ~ VRonin

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2
      1. Not Qt related
      2. You don't. if the enum is declared with Q_ENUM then moc will generate the string versions that qDebug() prints out but in general you can't

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved