nico@215: nico@215: nico@215: CanFestival: drivers/can_socket/can_socket.c File Reference nico@215: nico@215: nico@215: nico@215: nico@215:
nico@215:
nico@215:
nico@215:
nico@215: nico@215:

can_socket.c File Reference

#include <stdio.h>
nico@215: #include <string.h>
nico@215: #include <stdlib.h>
nico@215: #include <stddef.h>
nico@215: #include <errno.h>
nico@215: #include "config.h"
nico@215: #include <sys/socket.h>
nico@215: #include <sys/ioctl.h>
nico@215: #include "linux/can.h"
nico@215: #include "linux/can/raw.h"
nico@215: #include "net/if.h"
nico@215: #include "can_driver.h"
nico@215: nico@215:

nico@215: Include dependency graph for can_socket.c:

nico@215: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@215: nico@215: nico@215:

nico@215: Go to the source code of this file. nico@215: nico@215: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@215: nico@215: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@215: nico@215:

Defines

#define PF_CAN   29
#define AF_CAN   PF_CAN
#define CAN_IFNAME   "can%s"
#define CAN_SOCKET   socket
#define CAN_CLOSE   close
#define CAN_RECV   recv
#define CAN_SEND   send
#define CAN_BIND   bind
#define CAN_IOCTL   ioctl
#define CAN_ERRNO(err)   errno

Functions

UNS8 canReceive_driver (CAN_HANDLE fd0, Message *m)
UNS8 canSend_driver (CAN_HANDLE fd0, Message *m)
CAN_HANDLE canOpen_driver (s_BOARD *board)
int canClose_driver (CAN_HANDLE fd0)
nico@215:


Define Documentation

etisserant@240: nico@215:
nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define AF_CAN   PF_CAN
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 48 of file can_socket.c. nico@215:

nico@215: Referenced by canOpen_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define CAN_BIND   bind
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 55 of file can_socket.c. nico@215:

nico@215: Referenced by canOpen_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define CAN_CLOSE   close
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 52 of file can_socket.c. nico@215:

nico@215: Referenced by canClose_driver(), and canOpen_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215:
#define CAN_ERRNO (err   )    errno
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 57 of file can_socket.c. nico@215:

nico@215: Referenced by canOpen_driver(), canReceive_driver(), and canSend_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define CAN_IFNAME   "can%s"
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 50 of file can_socket.c. nico@215:

nico@215: Referenced by canOpen_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define CAN_IOCTL   ioctl
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 56 of file can_socket.c. nico@215:

nico@215: Referenced by canOpen_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define CAN_RECV   recv
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 53 of file can_socket.c. nico@215:

nico@215: Referenced by canReceive_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define CAN_SEND   send
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 54 of file can_socket.c. nico@215:

nico@215: Referenced by canSend_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define CAN_SOCKET   socket
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 51 of file can_socket.c. nico@215:

nico@215: Referenced by canOpen_driver(). nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: nico@215:
#define PF_CAN   29
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 47 of file can_socket.c. nico@215:

nico@215: Referenced by canOpen_driver(). nico@215:

nico@215:

nico@215:


Function Documentation

etisserant@240: nico@215:
nico@215:
nico@215: nico@215: nico@215: nico@215: etisserant@240: nico@215: nico@215: nico@215: nico@215: nico@215:
int canClose_driver (CAN_HANDLE  fd0  ) 
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 228 of file can_socket.c. nico@215:

nico@215: References CAN_CLOSE. nico@215:

nico@215:

etisserant@240: etisserant@240:

etisserant@240:
etisserant@240: etisserant@240: etisserant@240: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215:
CAN_HANDLE canOpen_driver (s_BOARD board  ) 
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 150 of file can_socket.c. nico@215:

nico@215: References AF_CAN, struct_s_BOARD::baudrate, struct_s_BOARD::busname, CAN_BIND, CAN_CLOSE, CAN_ERRNO, CAN_IFNAME, CAN_IOCTL, CAN_SOCKET, and PF_CAN. nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: etisserant@240: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215:
UNS8 canReceive_driver (CAN_HANDLE  fd0,
Message m 
)
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 64 of file can_socket.c. nico@215:

nico@215: References CAN_ERRNO, CAN_RECV, Message::cob_id, Message::data, Message::len, Message::rtr, and SHORT_CAN::w. nico@215:

nico@215:

etisserant@240: nico@215:

nico@215:
nico@215: nico@215: nico@215: nico@215: etisserant@240: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215: nico@215:
UNS8 canSend_driver (CAN_HANDLE  fd0,
Message m 
)
nico@215:
nico@215:
nico@215: nico@215:

nico@215: nico@215:

nico@215: Definition at line 90 of file can_socket.c. nico@215:

nico@215: References CAN_ERRNO, CAN_SEND, Message::cob_id, Message::data, Message::len, Message::rtr, and SHORT_CAN::w. nico@215:

nico@215:

etisserant@240:


Generated on Mon Jul 2 19:10:17 2007 for CanFestival by  nico@215: nico@215: doxygen 1.5.1
nico@215: nico@215: