Get connections of a doctype

hello. I need to get these connections for any doctype I want . I know how to get them one bye one , but it looks that there is a function that can do it . so anyone can help ?
sa