.. py:module:: structure structure -- Structure module ============================= This module exposes a number of tools and defines some classes that can be used to interacting with the structures defined in the database. The classes defined by this module wrap IDAPython's structure API and expose a simpler interface that can be used to perform various operations against a structure such as renaming or enumerating the structure's members. The base argument type for getting a :py:obj:`structure_t` can be either a name, an identifier, or an index. Typically one will call :py:obj:`structure.by` with either identifier type which will then return an instance of their :py:obj:`structure_t`. To list the different structures available in the database, one can use :py:obj:`structure.list` with their chosen method of filtering. This will list all of the available structures at which point the user can then request it by passing an identifer to :py:obj:`structure.by`. The chosen methods of filtering are: - ``name`` - Match the structures to a structure name - ``like`` - Filter the structure names according to a glob - ``regex`` - Filter the structure names according to a regular-expression - ``index`` - Match the structures by its index - ``identifier`` or ``id`` - Match the structure by its id which is a :py:obj:`idaapi.uval_t` - ``size`` - Filter the structures for any matching the specified size - ``greater`` or ``ge`` - Match structures that are larger (inclusive) than the specified size - ``gt`` - Match structures that are larger (exclusive) than the specified size - ``less`` or ``le`` - Match structures that are smaller (inclusive) than the specified size - ``lt`` - Match structures that are smaller (exclusive) than the specified size - ``predicate`` - Filter the structures by passing the id (:py:obj:`idaapi.uval_t`) to a callable Some examples of using these keywords are as follows:: > structure.list('my*') > iterable = structure.iterate(regex='__.*') > result = structure.search(index=42) ------------- Function list ------------- The functions that are available in this module use multicased functions and aliases. For more information on this, please see :ref:`multicase-aliases` and :ref:`multicase-functions`. .. py:function:: by(name, \*suffix, \*\*options) Return the structure with the given ``name``. :param name: the name of the structure to return :type name: str :param \*suffix: any other numbers or strings that should be appended to the name :param \*\*options: if ``offset`` is specified, then use it as the base offset of the structure .. py:function:: by(id, \*\*options) Return the structure with the specified ``id`` or index. :param id: the identifier or the index of the structure to return :type id: int or long :param \*\*options: if ``offset`` is specified, then use it as the base offset of the structure .. py:function:: by(sptr, \*\*options) Return the structure for the specified ``sptr``. :param sptr: the :py:obj:`idaapi.struc_t` to return :type sptr: idaapi.struc_t or structure_t :param \*\*options: if ``offset`` is specified, then use it as the base offset of the structure .. py:function:: by(tinfo, \*\*options) Return the structure for the specified ``tinfo``. :param tinfo: the :py:obj:`idaapi.tinfo_t` to return the structure for :type tinfo: idaapi.tinfo_t :param \*\*options: .. py:function:: by(\*\*type) Return the structure matching the keyword specified by ``type``. :param \*\*type: any keyword that can be used to match the structure with .. py:function:: by_identifier(identifier, \*\*options) Return the structure identified by ``identifier``. Aliases: :py:func:`structure.byid`, :py:func:`structure.by_id`, :py:func:`structure.byidentifier` :param identifier: the identifier of the structure to return :param \*\*options: if ``offset`` is specified, then use it as the base offset of the structure .. py:function:: by_index(index, \*\*options) Return a structure by its index. Aliases: :py:func:`structure.byindex` :param index: the index of the structure to return :param \*\*options: if ``offset`` is specified, then use it as the base offset of the structure .. py:function:: by_name(name, \*suffix, \*\*options) Return a structure by its name. Aliases: :py:func:`structure.byname` :param name: the name of the structure to return :param \*suffix: any other numbers or strings that should be appended to the name :param \*\*options: if ``offset`` is specified, then use it as the base offset of the structure .. py:function:: comment(id, \*\*repeatable) Return the comment of the structure identified by ``id``. If the bool ``repeatable`` is specified, return the repeatable comment. :param id: the identifier of the structure :type id: int or long :param \*\*repeatable: whether the comment should be repeatable or not .. py:function:: comment(structure, \*\*repeatable) Return the comment for the specified ``structure``. :param structure: the :py:obj:`structure_t` to return the comment for :type structure: structure_t :param \*\*repeatable: whether the comment should be repeatable or not .. py:function:: comment(structure, cmt, \*\*repeatable) Set the comment to ``cmt`` for the specified ``structure``. :param structure: the :py:obj:`structure_t` to apply the comment to :type structure: structure_t :param cmt: the comment to apply :type cmt: str :param \*\*repeatable: whether the comment should be repeatable or not .. py:function:: comment(structure, none, \*\*repeatable) Remove the comment from the specified ``structure``. :param structure: the :py:obj:`structure_t` to remove the comment from :type structure: structure_t :param none: the python value :py:obj:`None` :type none: None :param \*\*repeatable: whether the removed comment should be the repeatable one .. py:function:: comment(id, cmt, \*\*repeatable) Set the comment of the structure identified by ``id`` to ``cmt``. If the bool ``repeatable`` is specified, set the repeatable comment. :param id: the identifier of the structure :type id: int or long :param cmt: the comment to apply :type cmt: str :param \*\*repeatable: whether the comment should be repeatable or not .. py:function:: comment(id, none, \*\*repeatable) Remove the comment from the structure identified by ``id``. :param id: the identifier of the structure :type id: int or long :param none: the python value :py:obj:`None` :type none: None :param \*\*repeatable: whether the removed comment should be the repeatable one .. py:function:: fragment(structure, offset, \*\*base) Yield each member of the given ``structure`` from the specified ``offset`` as a tuple containing its attributes. :param structure: the structure to yield the members from :param offset: the starting offset of the fragment :type offset: int or long :param \*\*base: .. py:function:: fragment(structure, offset, size, \*\*base) Yield each member of the given ``structure`` from the specified ``offset`` up to ``size`` as a tuple containing its attributes. :param structure: the structure to yield the members from :param offset: the starting offset of the fragment :type offset: int or long :param size: the size of the members to yield :type size: int or long :param \*\*base: .. py:function:: fragment(id, offset, size, \*\*base) Yield each member of the structure with the specified ``id`` from the given ``offset`` up to ``size`` as a tuple containing its ``(offset, size, tags)``. If the integer ``base`` is defined, then the offset of each member will be translated by the given value. :param id: the identifer of the structure to yield the members from :type id: int or long :param offset: the starting offset of the fragment :type offset: int or long :param size: the size of the members to yield :type size: int or long :param \*\*base: .. py:function:: has(id) Return whether a structure with the specified ``id`` exists within the database. :param id: the identifier or the index of the structure to check :type id: int or long .. py:function:: has(name, \*suffix) Return if a structure with the specified ``name`` exists within the database. :param name: the name of the structure to check :type name: str :param \*suffix: any other numbers or strings that should be appended to the name .. py:function:: has(structure) Return whether the database includes the provided ``structure``. :param structure: the :py:obj:`idaapi.struc_t` or the :py:obj:`structure_t` to check :type structure: idaapi.struc_t or structure_t .. py:function:: index(id) Return the index of the structure identified by ``id``. :param id: the identifier of the structure to return the index for :type id: int or long .. py:function:: index(structure) Return the index of the specified ``structure``. :param structure: the :py:obj:`structure_t` to return the index for :type structure: structure_t .. py:function:: index(id, index) Move the structure identified by ``id`` to the specified ``index`` in the structure list. :param id: the identifier of the structure :type id: int or long :param index: the index to move the structure to :type index: int or long .. py:function:: index(structure, index) Move the specified ``structure`` to the specified ``index`` in the structure list. :param structure: the :py:obj:`structure_t` to move :type structure: structure_t :param index: the index to move the structure to :type index: int or long .. py:function:: is_frame(id) Return whether the structure identified by ``id`` is a frame or not. Aliases: :py:func:`structure.isframe`, :py:func:`structure.frameQ` :param id: the identifier of the structure to check :type id: int or long .. py:function:: is_frame(structure) Return whether the provided ``structure`` is a frame or not. Aliases: :py:func:`structure.isframe`, :py:func:`structure.frameQ` :param structure: the :py:obj:`idaapi.struc_t` or :py:obj:`structure_t` to check :type structure: idaapi.struc_t or structure_t .. py:function:: is_union(id) Return whether the structure identified by ``id`` is a union or not. Aliases: :py:func:`structure.unionQ`, :py:func:`structure.isunion` :param id: the identifier of the structure to check :type id: int or long .. py:function:: is_union(structure) Return whether the provided ``structure`` is defined as a union. Aliases: :py:func:`structure.unionQ`, :py:func:`structure.isunion` :param structure: the :py:obj:`idaapi.struc_t` or :py:obj:`structure_t` to check :type structure: idaapi.struc_t or structure_t .. py:function:: iterate(string, \*suffix) Iterate through all of the structures in the database with a glob that matches ``string``. :param string: the glob to filter the structure names with :type string: str :param \*suffix: any other numbers or strings that should be appended to the name .. py:function:: iterate(\*\*type) Iterate through all of the structures that match the keyword specified by ``type``. :param \*\*type: any keyword that can be used to filter structures with .. py:function:: list(string, \*suffix) List any structures that match the glob in ``string``. :param string: the glob to filter the structure names with :type string: str :param \*suffix: any other numbers or strings that should be appended to the name .. py:function:: list(\*\*type) List all the structures within the database that match the keyword specified by ``type``. :param \*\*type: any keyword that can be used to filter structures with .. py:function:: members(structure, \*\*base) Yield each member of the given ``structure`` as a tuple containing its attributes. :param structure: the structure to yield the members from :param \*\*base: a base address to translate the offset of each yielded member with .. py:function:: members(id, \*\*base) Yield each member of the structure with the specified ``id`` as a tuple of containing its ``(offset, size, tags)``. If the integer ``base`` is defined, then the offset of each member will be translated by the given value. :param id: the identifier of the structure to yield the members from :type id: int or long :param \*\*base: a base address to translate the offset of each yielded member with .. py:function:: name(id) Return the name of the structure identified by ``id``. :param id: the identifier of the structure to return the name of .. py:function:: name(structure) :param structure: the :py:obj:`structure_t` to return the name of :type structure: structure_t .. py:function:: name(id, string, \*suffix) Set the name of the structure identified by ``id`` to ``string``. :param id: the identifier of the structure to return the name for :param string: the name to rename the structure to :type string: str :param \*suffix: any other numbers or strings to append to the base name .. py:function:: name(structure, string, \*suffix) Set the name of the specified ``structure`` to ``string``. :param structure: the :py:obj:`structure_t` to rename :type structure: structure_t :param string: the name to rename the structure to :type string: str :param \*suffix: any other numbers or strings to append to the base name .. py:function:: new(string, \*suffix, \*\*offset) Return a new structure using the name specified by ``string``. If the integer ``offset`` is provided, then use it as the base offset for the newly created structure. :param string: a string to use as the name :type string: str or tuple :param \*suffix: any other numbers or strings to append to the name :param \*\*offset: the base offset of the structure that is being created .. py:function:: remove(structure) Remove the specified ``structure`` from the database. Aliases: :py:func:`structure.delete` :param structure: the :py:obj:`structure_t` to remove from the database :type structure: structure_t .. py:function:: remove(name, \*suffix) Remove the structure with the specified ``name``. Aliases: :py:func:`structure.delete` :param name: the name of the structure to remove from the database :type name: str :param \*suffix: any other numbers or strings that should be appended to the name .. py:function:: remove(id) Remove a structure by its index or ``id``. Aliases: :py:func:`structure.delete` :param id: the identifier of the structure to remove from the database :type id: int or long .. py:function:: remove(\*\*type) Remove the first structure that matches the result described by ``type``. Aliases: :py:func:`structure.delete` :param \*\*type: any keyword that can be used to match the structure with .. py:function:: search(string, \*suffix) Search through all the structure names matching the glob ``string``. :param string: the glob to match the structure name with :type string: str :param \*suffix: any other numbers or strings that should be appended to the name .. py:function:: search(\*\*type) Search through all of the structures and return the first result matching the keyword specified by ``type``. :param \*\*type: any keyword that can be used to filter the structures with .. py:function:: select(tag, \*And, \*\*boolean) Query all of the structure tags for the specified ``tag`` and any others specified as ``And``. :param tag: a required tag name to search for :type tag: str :param \*And: any other required tag names :param \*\*boolean: either ``And`` or ``Or`` which specifies required or optional tags (respectively) .. py:function:: select(\*\*boolean) Query all the structures (linearly) for any tags specified by ``boolean``. Yields each address found along with the matching tags as a dictionary. If ``And`` contains an iterable then require the returned structure contains them. If ``Or`` contains an iterable then include any other tags that are specified. :param \*\*boolean: either ``And`` or ``Or`` which specifies required or optional tags (respectively) .. py:function:: size(structure) Return the size of the specified ``structure``. :param structure: the :py:obj:`structure_t` to return the size for :type structure: structure_t .. py:function:: size(id) Return the size of the structure identified by ``id``. :param id: the identifier of the structure to return the size for :type id: int or long ---------- Class list ---------- Classes provide the definition necessary to instantiate an object. In most cases, a class is returned when calling one of the prior listed functions and thus have no need to be manually instantiated. Classes may also have aliases defined for them. Please refer to the documentation for the class to see what is available. For more information on aliases, please see :ref:`multicase-aliases`. ******** member_t ******** .. py:class:: member_t This object is an abstraction around a single member belonging to a structure. A member within a structue contains a number of properties which this object will expose. Some of these properties allow for a user to modify the member's :py:obj:`type` or :py:obj:`name`. The :py:obj:`tag` method is also provided to allow for a user to annotate the member similar to the database or a function's contents. Another method, :py:obj:`refs` will allow one to enumerate everything in the database that references said member. .. py:attribute:: bounds :param getter: Return the boundaries of the member. .. py:attribute:: comment The comment of this ``member_t``. :param getter: Return the repeatable comment of the member. :param repeatable: whether the comment should be repeatable or not :param setter: Set the repeatable comment of the member to ``value``. :param value: the comment to apply to the member :param repeatable: whether the comment should be repeatable or not .. py:attribute:: dt_type The \\"dt_type\\" attribute of the :py:class:`idaapi.member_t` that is wrapped by this ``member_t``. :param getter: Return the ``dt_type`` attribute of the member. .. py:attribute:: flag The flags for this specific ``member_t``. :param getter: Return the "flag" attribute of the member. .. py:attribute:: fullname The full name for this ``member_t`` including its structure's name. :param getter: Return the fullname of the member. .. py:attribute:: id The member identifier for this ``member_t``. :param getter: Return the identifier of the member. .. py:attribute:: index The index of this ``member_t`` into its structure. :param getter: Return the index of the member. .. py:attribute:: left The starting offset of the ``member_t``. :param getter: Return the beginning offset of the member. .. py:attribute:: name The name of this ``member_t``. :param getter: Return the name of the member. :param setter: Set the name of the member to ``string``. :param string: the new name to rename the member to .. py:attribute:: offset :param getter: Return the offset of the member. .. py:attribute:: parent :param getter: Return the structure_t that owns the member. .. py:attribute:: properties The \\"props\\" field of the :py:class:`idaapi.member_t` that this ``member_t`` wraps. :param getter: Return the properties for the current member. .. py:attribute:: ptr The :py:class:`idaapi.member_t` that this ``member_t`` wraps. :param getter: Return the pointer of the :py:obj:`idaapi.member_t`. .. py:attribute:: realbounds The ``structure_t`` that owns this ``member_t``. :param getter: Return the real boundaries of the member. .. py:attribute:: realoffset The offset of this ``member_t`` relative to the structure's base offset. :param getter: Return the real offset of the member. .. py:attribute:: right The ending offset of the ``member_t`` (starting offset plus its size). :param getter: Return the ending offset of the member. .. py:attribute:: size The size of this ``member_t``. :param getter: Return the size of the member. .. py:attribute:: type The pythonic type that is associated with this ``member_t``. :param getter: Return the type of the member in its pythonic form. :param setter: Set the type of the member to the provided ``type``. :param type: the pythonic type to set the member type to .. py:attribute:: typeid The type identifier for this ``member_t``. :param getter: Return the identifier of the type of the member. .. py:attribute:: typeinfo :param getter: Return the type information of the current member. :param setter: Set the type information of the current member to ``info``. :param info: the type information to apply to the member .. py:method:: refs(self) Return the ``(address, opnum, type)`` of all the code and data references to this member within the database. If ``opnum`` is :py:obj:`None`, then the returned ``address`` has the structure applied to it. If ``opnum`` is defined, then the instruction at the returned ``address`` references a field that contains the specified structure. .. py:method:: tag(self) Return the tags associated with the member. .. py:method:: tag(self, key) Return the tag identified by ``key`` belonging to the member. :param key: a string representing the tag name :type key: str .. py:method:: tag(self, key, value) Set the tag identified by ``key`` to ``value`` for the member. :param key: a string representing the tag name :type key: str :param value: a python object to store at the tag .. py:method:: tag(self, key, none) Removes the tag specified by ``key`` from the member. :param key: a string representing the tag name :type key: str :param none: the python value :py:obj:`None` :type none: None ********* members_t ********* .. py:class:: members_t This object is an abstraction around all the members belonging to a specific IDA structure. This object is implicitly part of a :py:obj:`structure_t` and allows one to access each member of the structure by its index as well as create new members and remove existing ones from the structure. To list the different members available in the structure, one can use :py:obj:`structure.list` with a chosen method of filtering. This will list all of the available members that match the keyword that they specified. The keywords that are available to filter members are: - ``name`` - Match the structure member by a name - ``offset`` - Match the structure member by its offset - ``like`` - Filter the structure members according to a glob - ``regex`` - Filter the structure members according to a regular-expression - ``index`` - Match the structure member by its index - ``fullname`` - Filter the structure members by matching its full name according to a glob - ``comment`` or ``comments`` - Filter the structure members by applying a glob to its comment - ``identifier`` or ``id`` - Match the structure member by its identifier - ``greater`` or ``ge`` - Filter the structure members for any after the specified offset (inclusive) - ``gt`` - Filter the structure members for any after the specified offset (exclusive) - ``less`` or ``le`` - Filter the structure members for any before the specified offset (inclusive) - ``lt`` - Filter the structure members for any before the specified offset (exclusive) - ``predicate`` - Filter the structure members by passing the :py:obj:`member_t` to a callable Some examples of using these keywords are as follows:: > st.members.list('field_4*') > iterable = st.members.iterate(like='p_*') > result = st.members.by(offset=0x2a) .. py:attribute:: owner The ``structure_t`` that owns this ``members_t``. :param getter: Return the owner :py:obj:`structure_t` for this :py:obj:`members_t`. .. py:attribute:: ptr The :py:class:`idaapi.member_t` that this ``members_t`` wraps. :param getter: Return the pointer to the :py:obj:`idaapi.member_t` that contains all the members. .. py:method:: add(self, name) Append the specified member ``name`` with the default type at the end of the structure. :param name: the name of the member to add :type name: str or tuple .. py:method:: add(self, name, type) Append the specified member ``name`` with the given ``type`` at the end of the structure. :param name: the name of the member to add :type name: str or tuple :param type: the pythonic type of the new member to add .. py:method:: add(self, name, type, offset) Add a member at ``offset`` with the given ``name`` and ``type``. To specify a particular size, ``type`` can be a tuple with the second element referring to the size. :param name: the name of the member to add :type name: str or tuple :param type: the pythonic type of the new member to add :param offset: the offset to add the member at :type offset: int or long .. py:method:: by(self, \*\*type) Return the member that matches the keyword specified by ``type``. :param \*\*type: any keyword that can be used to match the structure member with .. py:method:: by(self, name, \*suffix) Return the member with the specified ``name``. :param name: the name of the member to return :type name: str :param \*suffix: any other numbers or strings that should be appended to the name .. py:method:: by(self, offset) Return the member at the specified ``offset``. :param offset: the offset of the member to return :type offset: int or long .. py:method:: by(self, location) Return the member at the specified ``location``. :param location: a tuple containing the offset and exact size to use when locating the member :type location: tuple .. py:method:: by_fullname(self, fullname, \*suffix) Return the member with the specified ``fullname``. Aliases: :py:func:`structure.members_t.byfullname` :param fullname: the full name of the member to return :param \*suffix: any other numbers or strings that should be appended to the name .. py:method:: by_identifier(self, id) Return the member in the structure that has the specified ``id``. Aliases: :py:func:`structure.members_t.byid`, :py:func:`structure.members_t.by_id` :param id: the identifier of the member to return .. py:method:: by_name(self, name, \*suffix) Return the member with the specified ``name``. Aliases: :py:func:`structure.members_t.byname` :param name: the name of the member to return :param \*suffix: any other numbers or strings that should be appended to the name .. py:method:: by_offset(self, offset) Return the member at the specified ``offset`` from the base offset of the structure. Aliases: :py:func:`structure.members_t.byoffset` :param offset: the offset of the member to return .. py:method:: by_realoffset(self, offset) Return the member at the specified ``offset`` of the structure. Aliases: :py:func:`structure.members_t.byrealoffset` :param offset: the real offset of the member to return .. py:method:: index(self, member) Return the index of the specified ``member``. :param member: the :py:obj:`member_t` to return the index for .. py:method:: iterate(self, \*\*type) Iterate through all of the members in the structure that match the keyword specified by ``type``. :param \*\*type: any keyword that can be used to filter the structure members with .. py:method:: iterate(self, string, \*suffix) Iterate through all of the members in the structure with a name that matches the glob in ``string``. :param string: the glob to filter the structure member names with :type string: str :param \*suffix: any other numbers or strings that should be appended to the name .. py:method:: list(self, string, \*suffix) List any members that match the glob in ``string``. :param string: the glob to filter the structure member names with :type string: str :param \*suffix: any other numbers or strings that should be appended to the name .. py:method:: list(self, \*\*type) List all the members within the structure that match the keyword specified by ``type``. :param \*\*type: any keyword that can be used to filter the structure members with .. py:method:: near_offset(self, offset) Return the member nearest to the specified ``offset`` from the base offset of the structure. Aliases: :py:func:`structure.members_t.nearoffset`, :py:func:`structure.members_t.near` :param offset: the offset nearest to the member to return .. py:method:: near_realoffset(self, offset) Return the member nearest to the specified ``offset``. :param offset: the real offset nearest to the member to return .. py:method:: pop(self, index) Remove the member at the specified ``index``. :param index: the index of the member to remove .. py:method:: remove(self, offset) Remove the member at ``offset`` from the structure. :param offset: the offset of the member to remove .. py:method:: remove(self, offset, size) Remove all the members from the structure from the specified ``offset`` up to ``size`` bytes. :param offset: the offset of the starting member to remove :param size: the size of the members that follow to remove .. py:method:: select(self, tag, \*And, \*\*boolean) Query all of the members for the specified ``tag`` and any others specified as ``And``. :param tag: a required tag name to search for :type tag: str :param \*And: any other required tag names :param \*\*boolean: either ``And`` or ``Or`` which specifies required or optional tags (respectively) .. py:method:: select(self, \*\*boolean) Query all of the members (linearly) for any tags specified by ``boolean``. Yields each member found along with the matching tags as a dictionary. If ``And`` contains an iterable then require the returned members contains them. If ``Or`` contains an iterable then include any other tags that are specified. :param \*\*boolean: either ``And`` or ``Or`` which specifies required or optional tags (respectively) *********** structure_t *********** .. py:class:: structure_t This object is an abstraction around an IDA structure type. This allows for one to treat an IDA structure as a regular python object. A number of methods and properties are provided in order to access certain attributes of the structure. To access the members belonging to the structure, one can use the :py:obj:`.members` property. This property is intended to be treated as an array in order to access the different elements available. This property also allows a user to create a new member or remove an already existing one. .. py:attribute:: bounds The :py:class:`interface.bounds_t` describing the boundaries of this structure relative to its base offset. :param getter: .. py:attribute:: comment The comment belonging to the ``structure_t``. :param getter: Return the repeatable comment for the structure. :param repeatable: :param setter: Set the repeatable comment for the structure to ``value``. :param value: a string repesenting the comment to apply :param repeatable: whether the comment should be repeatable or not .. py:attribute:: id The identifier for this ``structure_t``. :param getter: Return the identifier of the structure. .. py:attribute:: index The index of this ``structure_t`` within the IDA's structure list. :param getter: Return the index of the structure. :param setter: Set the index of the structure to ``idx``. :param index: the new index to move the structure to .. py:attribute:: members The ``members_t`` for accessing the structure members. :param getter: Return the members belonging to the structure. .. py:attribute:: name The name of the ``structure_t``. :param getter: Return the name of the structure. :param setter: Set the name of the structure to ``string``. :param string: a string representing the new name of the structure .. py:attribute:: offset The base offset of the ``structure_t``. :param getter: Return the base offset of the structure. :param setter: Set the base offset of the structure to ``offset``. :param offset: the new base offset to assign to the structure .. py:attribute:: ordinal :param getter: Return the ordinal number of the structure within the current type library. .. py:attribute:: properties The \\"props\\" field of the :py:class:`idaapi.struc_t` that this ``structure_t`` wraps. :param getter: Return the properties for the current structure. .. py:attribute:: ptr The :py:class:`idaapi.struc_t` that this ``structure_t`` wraps. :param getter: Return the pointer of the :py:obj:`idaapi.struc_t`. .. py:attribute:: realbounds The :py:class:`interface.bounds_t` describing the boundaries of this structure. :param getter: .. py:attribute:: size The total size of the ``structure_t``. :param getter: Return the size of the structure. :param setter: Expand the structure to the new ``size`` that is specified. :param size: an integer representing the new size to expand the structure to .. py:attribute:: typeinfo :param getter: Return the type information of the current structure. :param setter: Sets the type information of the current structure to ``info``. :param info: .. py:method:: contains(self, offset) Return whether the specified ``offset`` is contained by the structure. :param offset: the offset to check .. py:method:: destroy(self) Remove the structure from the database. .. py:method:: field(self, offset) Return the member at the specified offset. :param offset: the offset of the member to return .. py:method:: refs(self) Return all the structure members and operand references which reference this specific structure. .. py:method:: tag(self) Return the tags associated with the structure. .. py:method:: tag(self, key) Return the tag identified by ``key`` belonging to the structure. :param key: a string representing the tag name :type key: str .. py:method:: tag(self, key, value) Set the tag identified by ``key`` to ``value`` for the structure. :param key: a string representing the tag name :type key: str :param value: a python object to store at the tag .. py:method:: tag(self, key, none) Removes the tag specified by ``key`` from the structure. :param key: a string representing the tag name :type key: str :param none: the python value :py:obj:`None` :type none: None .. py:method:: up(self) Return all structure or frame members within the database that reference this particular structure.