PORTMAP2(3)

πŸ’– PORTMAP2 πŸ’–

okay bestie, welcome to portmap2 β€” this is the PORTMAPv2 decoding module, and yes it's portmap2 2.0 era, we're thriving. it lives at packet.nfs.portmap2 and it is so much struct. buckle up πŸŽ€


✨ NAME ✨

packet.nfs.portmap2 β€” PORTMAPv2 decoding module

the way that this whole page is just classes and unions and we're gonna love every single one of them πŸ¦‹


πŸ‘‘ CLASSES πŸ‘‘

every class below is listed in order, no skips, no shortcuts. if it's here, it's here. periodt.


πŸ“ class CALLIT2args(baseobj.BaseObj)

struct CALLIT2args {
    portmap_prog2 prog;
    unsigned int  vers;
    unsigned int  proc;
    opaque        args<>;
};

Methods defined here:

  • __init__(self, unpack) β€” Constructor. sets up the object's own private data from whatever arguments you hand it. you can pass them positionally, as named arguments, or a lil combo of both. your choice, main character πŸ’…

πŸ“ class CALLIT2res(baseobj.BaseObj)

struct CALLIT2res {
    unsigned int port;
    opaque       res<>;
};

Methods defined here:

  • __init__(self, unpack) β€” Constructor. initializes the object's private data according to the arguments given. positional args, named args, or both together β€” all valid, all iconic ✨

πŸ“ class DUMP2res(baseobj.BaseObj)

struct DUMP2res {
    entry2 *entries;
};

Methods defined here:

  • __init__(self, unpack) β€” Constructor. sets the object's private data up based on the arguments you give it. positional, named, or a mix β€” go off 🫢

πŸ“ class GETPORT2args(mapping)

struct mapping {
    portmap_prog2 prog;
    unsigned int  vers;
    proto2        prot;
    unsigned int  port;
};
ngl this one inherits straight from mapping and adds no methods of its own. the struct is the whole vibe. no cap.

πŸ“ class GETPORT2res(baseobj.BaseObj)

struct GETPORT2res {
    unsigned int result;
};

Methods defined here:

  • __init__(self, unpack) β€” Constructor. initializes the object's private data from the arguments given β€” positional, named, or both at once πŸ’œ

πŸ“ class PORTMAP2args(packet.utils.RPCload)

union switch PORTMAP2args (portmap_proc2 procedure) {
    case const.PMAPPROC_NULL:
        void;
    case const.PMAPPROC_SET:
        SET2args opset;
    case const.PMAPPROC_UNSET:
        UNSET2args opunset;
    case const.PMAPPROC_GETPORT:
        GETPORT2args opgetport;
    case const.PMAPPROC_DUMP:
        void;
    case const.PMAPPROC_CALLIT:
        CALLIT2args opcallit;
};

Methods defined here:

  • __init__(self, unpack, procedure) β€” Constructor. sets up the object's private data according to the arguments given. arguments can come in positionally, as named arguments, or as a combination of the two. note the extra procedure in there, she's important 😌

πŸ“ class PORTMAP2res(packet.utils.RPCload)

union switch PORTMAP2res (portmap_proc2 procedure) {
    case const.PMAPPROC_NULL:
        void;
    case const.PMAPPROC_SET:
        SET2res opset;
    case const.PMAPPROC_UNSET:
        UNSET2res opunset;
    case const.PMAPPROC_GETPORT:
        GETPORT2res opgetport;
    case const.PMAPPROC_DUMP:
        DUMP2res opdump;
    case const.PMAPPROC_CALLIT:
        CALLIT2res opcallit;
};

Methods defined here:

  • __init__(self, unpack, procedure) β€” Constructor. initializes the object's private data per the arguments given β€” positional, named, or both, and procedure rides along too πŸ’–

πŸ“ class SET2args(mapping)

struct mapping {
    portmap_prog2 prog;
    unsigned int  vers;
    proto2        prot;
    unsigned int  port;
};
inherits from mapping, brings zero extra methods, still serving looks. that's it, that's the class 🌸

πŸ“ class SET2res(bool_res)

struct bool_res {
    bool result;
};
inherits from bool_res. no methods listed. just a very cute little bool living its life ⭐

πŸ“ class UNSET2args(mapping)

struct mapping {
    portmap_prog2 prog;
    unsigned int  vers;
    proto2        prot;
    unsigned int  port;
};
inherits from mapping, no methods of its own. yes it's the same struct as SET2args, and yes we're still gonna show it in full because every detail stays πŸ’―

πŸ“ class UNSET2res(bool_res)

struct bool_res {
    bool result;
};
inherits from bool_res. no methods. immaculate. no notes πŸ”₯

πŸ“ class bool_res(baseobj.BaseObj)

struct bool_res {
    bool result;
};

Methods defined here:

  • __init__(self, unpack) β€” Constructor. initializes the object's private data according to the arguments given. arguments can be positional, named, or a combination of both πŸŽ€

πŸ“ class entry2(baseobj.BaseObj)

struct entry2 {
    mapping map;
    entry2  *next;
};

Methods defined here:

  • __init__(self, unpack) β€” Constructor. initializes the object's private data according to the arguments given β€” positional, named, or both, you already know the drill bestie πŸ’…

πŸ“ class mapping(baseobj.BaseObj)

struct mapping {
    portmap_prog2 prog;
    unsigned int  vers;
    proto2        prot;
    unsigned int  port;
};

Methods defined here:

  • __init__(self, unpack) β€” Constructor. sets up the object's private data from the arguments given. positional, named, or a mix of both 🧚

πŸ“ class portmap_proc2(packet.utils.Enum)

enum portmap_proc2
it's an enum. subclass of packet.utils.Enum. no methods listed down here, she's just vibes 🌈

πŸ“ class portmap_prog2(packet.utils.Enum)

enum portmap_prog2
another enum, another packet.utils.Enum child. no methods defined here. still iconic πŸ‘‘

πŸ“ class proto2(packet.utils.Enum)

enum proto2
and the last one β€” an enum, extends packet.utils.Enum, no methods listed. we love a clean finish ✨

πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, iykyk πŸ’œ


πŸ’€ BUGS πŸ’€

No known bugs.

literally not a single one. she's flawless. don't jinx it πŸ™ˆ

🌸 AUTHOR 🌸

Jorge Mora (mora@netapp.com)


and that's the whole page, bestie!! you ate this. this doc is brought to you by NFStest 3.2, dated 21 March 2023 β€” so go forth, decode some PORTMAPv2, and remember: every option, every struct, every method, all of it stayed exactly where it was supposed to be. periodt πŸ’–πŸŽ€πŸ¦‹βœ¨