Involved in defensive oleoresin formation in conifers in response to insect attack or other injury. Involved in sesquiterpene (C15) olefins biosynthesis. Produces mainly longifolene, but also multiple minor products including alpha-longipinene, alpha-longicyclene, E-beta-farnesene, longiborneol, cyclosativene, beta-longipinene, and 12 other sesquiterpenes when used with farnesyl diphosphate (FPP) as substrate. (2E,6E)-farnesyl diphosphate = diphosphate + longifolene Binds 3 Mg(2+) or Mn(2+) ions per subunit. Sesquiterpene biosynthesis. Terpene metabolism; oleoresin biosynthesis. The Asp-Asp-Xaa-Xaa-Asp/Glu (DDXXD/E) motif is important for the catalytic activity, presumably through binding to Mg(2+). Belongs to the terpene synthase family. Tpsd subfamily.