NETWORK ATTACKS FRAMEWORK  1.0.0
A NETwork Attacks framework. Making network attacks impact evaluation easier!
NA_list.cc File Reference
#include <stdlib.h>
#include "NA_list.h"

Go to the source code of this file.

Functions

int list_add (list_t *head, list_t *le)
int list_add_tail (list_t *head, list_t *le)
int list_detach (list_t *le)
int list_empty (list_t *head)
list_tlist_first (list_t *head)
int list_unattached (list_t *le)

Function Documentation

int list_add ( list_t head,
list_t le 
)

Definition at line 45 of file NA_list.cc.

{

    if (!head || !le)
        return LIST_NULL;

    listelm_add(le, head, head->next);

    return LIST_SUCCESS;
}
int list_add_tail ( list_t head,
list_t le 
)

Definition at line 56 of file NA_list.cc.

{

    if (!head || !le)
        return LIST_NULL;

    listelm_add(le, head->prev, head);

    return LIST_SUCCESS;
}
int list_detach ( list_t le)

Definition at line 67 of file NA_list.cc.

{
    if (!le)
        return LIST_NULL;

    listelm_detach(le->prev, le->next);

    le->next = le->prev = NULL;

    return LIST_SUCCESS;
};
int list_empty ( list_t head)

Definition at line 80 of file NA_list.cc.

{
    if (head == head->next)
        return 1;
    return 0;
}
list_t* list_first ( list_t head)

Definition at line 87 of file NA_list.cc.

{
    return head->next;
}
int list_unattached ( list_t le)

Definition at line 92 of file NA_list.cc.

{
    if (le->next == NULL && le->prev == NULL)
        return 1;
    return 0;
}
 All Classes Files Functions Variables Typedefs Enumerator Defines