This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

iso-tp socket interfacing on Beaglebone Black

I am trying to set up an ISO-TP connection on Beaglebone Debian.  I set up the socket call as:

s_iso = socket(PF_CAN, SOCK_DGRAM, CAN_ISOTP)

All the parts are in the header file (can.h), can.h and socket.h are #included but the compiler (perror("socket") ) complains as:

socket: Protocol wrong type for socket

I assume this corresponds to the CAN_ISOTP reference which is defined in can.h.  What am I missing?