A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sim_errno.h
Go to the documentation of this file.
1 #ifndef NSC_SIM_ERRNO_H
2 #define NSC_SIM_ERRNO_H
3 
4 // list of network stack errors that may happen in a simulation,
5 // and can be handled by the simulator in a sane way.
6 // Note that NSC handles several errors internally though
7 // nsc_assert, BUG() and friends, because they (should) never
8 // happen in a simulation (e.g. ESOCKTNOSUPPORT).
9 //
10 // These values are returned by the various methods provided by nsc.
11 // They must always be < 0, as values >= 0 are a success indicator;
12 // e.g. send_data() will return the number of bytes sent or one of
13 // the nsc_errno numbers below, accept() will return 0 on success or
14 // one of the nsc_errno numbers below, etc.
15 enum nsc_errno {
19  NSC_EAGAIN = -12,
20  NSC_EALREADY = -25,
26  NSC_EISCONN = -61,
27  NSC_EMSGSIZE = -70,
29  NSC_ENOTCONN = -86,
30  NSC_ENOTDIR = -87, // used by sysctl(2)
31  NSC_ESHUTDOWN = -130,
32  NSC_ETIMEDOUT = -140,
33 };
34 
35 #endif /* NSC_SIM_ERRNO_H */
nsc_errno
Definition: sim_errno.h:15