Figured it out in case somebody else has the same problem. This may only be an issue with the new shiny ConnectPort X2e ZB (I'm using the Ethernet model) since the older black X2 with an external antenna doesn't require this additional line of code. To interpret the AF_ZIGBEE definition another module called 'zigbee' is needed, and this must be imported before you import 'socket'.
from zigbee import *
from socket import *
sd = socket(AF_ZIGBEE, SOCK_DGRAM, XBS_PROT_TRANSPORT)
The above code will run without error (fixed the ZBS->XBS typo as well). My issue now is that it doesn't function .. at least not the same as it did before when running on the X2. The full code is:
from zigbee import *
from socket import *
sd = socket(AF_ZIGBEE, SOCK_DGRAM, XBS_PROT_TRANSPORT)
sd.bind(("", 0xe8, 0, 0))
while 1:
payload, src_addr = sd.recvfrom(128)
print payload
Previously (though without the zigbee import line) this code running on an X2 would wait until it received a message from a zigbee module in the network destined for the controller (address 0) then print the message to the console. Running on the X2e, adding the import zigbee line lets it run without error, but it doesn't do anything. If anybody has experience running a similar basic communication script on one of the new X2e's and can offer some insight, let me know!
Thanks,
Jeremy