@property
def mode(self):
    with self.llc.lock:
        try:
            if isinstance(self.sock_list[0], RawAccessPoint):
                return RAW_ACCESS_POINT
            if isinstance(self.sock_list[0], LogicalDataLink):
                return LOGICAL_DATA_LINK
            if isinstance(self.sock_list[0], DataLinkConnection):
                return DATA_LINK_CONNECTION
        except IndexError:
            return 0
@property
def mode(self):
    with self.llc.lock:
        try:
            if isinstance(self.sock_list[0], RawAccessPoint):
                return RAW_ACCESS_POINT
            if isinstance(self.sock_list[0], LogicalDataLink):
                return LOGICAL_DATA_LINK
            if isinstance(self.sock_list[0], DataLinkConnection):
                return DATA_LINK_CONNECTION
        except IndexError:
            return 0